Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Largest Contentful Paint

Started by Jason 3 years ago · 5 replies · 839 views
3 years ago

I have a pretty snappy site, but the LCP on mobile is too long. It looks like the Hero image is the primary culprit. Is there any way to improve the load delay?
image|622x500

Thanks,
J

3 years ago

@unleashed, Are you using responsive images? This will allow the browser to choose different images depending on the size of the provided images and the dimensions of the device.

3 years ago

Not yet. I reviewed the Responsive images in the getgrav.org manual. Is it really as easy as adding the sizes with media queries in the markdown or twig?

3 years ago

@unleashed,

Is it really as easy as adding the sizes with media queries in the markdown or twig?

Why this doubt? Have you experienced issues with responsive images before using Grav?

Depending on the command you use, Grav will generated several images, each with a different size. These images will then be listed in the <img> element.

3 years ago

Great! Thanks for the confirmation and encouragement! I'll give it a try. It's less about doubt in Grav and more about my trepidation of coding. I thought there would be more involved.

Thanks,
J

3 years ago

@unleashed:
It’s less about doubt and more about trepidation.

It's always a good idea to experiment on a local development machine... :-)

After experimenting, please mark your post as 'solved'.

Suggested topics

Topic Participants Replies Views Activity
Support · by webmasterodp, 2 weeks ago
4 248 2 weeks ago
Support · by nwhitfield, 2 weeks ago
2 213 2 weeks ago
Support · by stell, 4 weeks ago
5 458 3 weeks ago
Support · by gravinator, 2 months ago
5 637 3 weeks ago
Support · by Gravver, 1 month ago
6 430 4 weeks ago