Getting penalised in Core Web Vitals due to Cumulative Layout shift

Dear Ghost team,

Google has started penalising my blog due to Cumulative Layout Shift being longer than they mandate. Apparently, this happens because the hero images lack explicit height and width. Is there a workaround? I am using the stock Casper theme.

Cheers,

Evgeny

To fix this issue, you can customize the Casper theme to suite the image you’re using as a background. You would need to add the width and height attributes (matching your image) to the image tag in the index.hbs file. Rezip your theme and upload it. Then, you should avoid any cumulative layout shift on that element.

Alternatively, depending on your design preferences, you can also just delete the background image. Casper will then fallback to your brand color as the background. But this might be throwing the baby out with the bath water…

Thank you! Is there any way to get this achieved dynamically/automatically in Ghost? Also, are there themes (other than Casper) that achieve this, perhaps?

Cheers,

Evgeny

Hello. I have Google adsense ads on my site. This is why my Cumulative Layout Shift score is high. What do I need to do for this?