Responsive images are broken when used on collection pages with multiple layouts

So we are using multiple layouts for a CMS collection as discussed in this video: Creating multiple layouts for Webflow collection template pages | Webflow live stream

Whatever layouts are hidden when we publish, all of the images on the hidden layouts get an incorrect sizes attribute that hides the images on mobile. Turning off responsive images fixes this because the image doesn’t get the sizes attribute, but then we are loading massive images for mobile when we should not be. Has anyone encountered a fix for this? It’s a pretty major issue. This did not used to be a problem so this bug has popped up in the last few months I believe.

This is the sizes attribute the images get:
sizes="(max-width: 479px) 0px, 100vw"

1 Like