CLS Shift issue (Media Gallery view Item)


Active member
I guess because it only just got around to it, but I just got a warning from Google about CLS issues on thousands of pages.

They all related to gallery item pages - which I can confirm if I load one up.

Are they lazy loaded, as I can see that xF is correctly setting a height and width element to the image itself, but it doesn't seem to have any effect when the page actually displays.

Has anyone come up with a solution to this? I don't really want to exclude media items from the google index....


Active member
Well this post also solves the issue (but editing the xfmc_media_view.less template)

Removing the width: auto from the declaration, is this a proper fix?


XenForo moderator
Staff member
I've moved the thread to bug reports so the dev's can decide if they want to implement something similar for media pages.