CLS Shift issue (Media Gallery view Item)

benFF

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....
 

benFF

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


Removing the width: auto from the img.media-container declaration, is this a proper fix?
 

Brogan

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.
 
Top