Cs_enable_srcset broken in Pro 6.5.x?

We have been using add_filter( 'cs_enable_srcset', '__return_true' ); in our functions.php to enable srcset / sizes attributes on all images. This is important, as it helps us to bring loading times within to appropriate bounds, as measured by Lighthouse and PageSpeed Insights.

Unfortunately, since Pro 6.5.0, this has been broken. As far as can tell, since 6.5.0, the only way we can now enable srcset and sizes is to manually set “Attachment Srcset” on every single image.

Needless to say, this is not a viable approach. There are hundreds, perhaps thousands, of images throughout our site. Updating that setting on each and every one of them is untenable.

Is there a solution to this issue?

I’ll change the filter to force the srcset on attachments. Have a great day.

That’s great - will that be in 6.5.2?

Hey @nydi_webmaster,

It should be in the upcoming release, I highly suggest that you check our updates from time to time.

Thank you.


If you have pre-release code for this fix that you would like us to test on our site, please let us know! We’d love to help.

Hi @nydi_webmaster,

Unfortunately, we don’t have a pre-release version right now.