-
I'm having a hard time solving one specific challenge. For this, I installed a new Hugo and clean PaperMod theme. It works as is, Google Lighthouse = 100% on everything. However, as soon as I add 1 image as cover to a post, CLS changes to 0.136 in list pages (which suppose to be under 0.1). When adding a second cover, CLS changes to 0.253. And so fort. At some point, it stops at 0.7xx. Only CLS changes, nothing else! One solution I found so far is adding The second solution I tried was adding image height/width to Lighthouse reports that the shifting elements are:
Basically, the rounded white box on list pages. NOTE: it starts to shift at the second box, the first box seems not to be the problem. My question: where should I be looking to solve this issue? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
My pull request #519 should solve your issue. Can you confirm this? |
Beta Was this translation helpful? Give feedback.
-
Just a little update: I have moved all images and covers from I already managed, before using page bundle, to gain speed by using QuickLinks library, lazy load library (on top of what PaperMod already has) and converting images to webp. But with page bundles and Hugo's image processing, it's a completely different level. You cannot actually measure this speed gain technically with Lighthouse, but you can definitely "feel" it. It falls under Chrome User Experience Report. One thing to keep in mind, you will end up with 3-4x more images, since for each resolution a new image is generated. This will bloat your git repo. I solved this (or trying at the moment) by using Git LFS. But again, the speed gain is staggering! It's definitely worth it if you intend to serve a lot of images to mobile users. I have also thought about where this idea of using |
Beta Was this translation helpful? Give feedback.
My pull request #519 should solve your issue. Can you confirm this?