GOGETMUSCLE Community Preloading dynamic image in template (react module)

Preloading dynamic image in template (react module)

Hello, I have a React module and I want to improve its LCP (in this case, an image). I need to find a way to preload the image in the template to boost my LCP score. Does anyone know a solution? I tried using useInlineHeadAsset, but it only runs once React has loaded, so it doesn’t help.
The module’s image is dynamic, so I can’t hard-code a preload tag. I need a way for the template and the React module to communicate the image URL. Or are there any solutions to preload the image here ?

Leave a Reply

Your email address will not be published.

Related Post