Addressing PageSpeed Insights Reports

IN THIS ARTICLE
Contents

When testing your website using Google PageSpeed Insights, you may come across the issue of “Image elements do not have explicit width and height”.

PageSpeed Insights does make a good point in that setting the width and height explicitly for each image is useful to prevent layout shift when a page is loading, hence improving its CLS. However, Spotlight’s feed layouts reserve the needed space before the images are loaded. 

Spotlight sets the width and height of the layout’s cells explicitly and then lets the images fill each entire cell. 

Although Spotlight may not be giving a specific size for each image, it does set a specific size to their containing elements, achieving the same effect.

GIVE FEEDBACK

Was this article helpful?

Still stuck?

Instagram Feeds Lookbook

Free Download

Instagram Feeds Lookbook

Get inspired by nine of the best use cases of Instagram feeds from real Spotlight users.