Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Largest Contentful Paint

Started by Jason 3 years ago · 5 replies · 643 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 Paul Hodges, 6 days ago
13 218 4 hours ago
Support · by gtx, 4 days ago
2 126 3 days ago
Support · by Anna, 2 weeks ago
9 300 3 days ago
Support · by TomW, 1 week ago
4 164 6 days ago
Support · by Anna, 1 week ago
4 172 7 days ago