hello everyone I am working on a big react app and my new task is about optimizing it's performance to get a better performance score in lighthouse the big issue that i have is about lcp(largest contentfull paint) the element that now is known as our page lcp is a div that has an image background , i've read many articles about how to optimize that image but all of talk about static assets that can't be my option , my app uses dynamic rendering for elements and also all images are dynamic , never mind , the issue that i just want to solve is how to preload that background image while my script still don't parse it , if i want to make it clear i want to preload a url with webpack when the element that render that image isn't painted on screen , doe's webpack support something like this ? i've read previousely something about dynamic import for the main bundle of react app
i need webpack to start fething my url and cache the response (as its default behavior) and when i need the url it instanly load and be painted on the screen