Using WP's native srcset with Pro

Can anyone share their experience using WP’s native srcset imprementation with X Pro? I did a quick test and turned on the srcset feature on a staging site with an image-heavy Pro child theme, and when reloading, almost all of my image layouts needed to be readjusted. I have not yet spent any time digging into what will need to be changed in the builder, but I think it will probably have something to do with the “Retina & Dimensions” and “Object Fit & Position” settings for the image elements.

I’m hoping there is someone in the Themeco community who has experience implementing srcset on their Pro-built sites. This is becoming absolutely essential to achieving higher page performance scores and SEO. I would be so very grateful for anyone’s experience and/or recommendations for successfully implementing srcset on Pro websites.

Thanks in advance!

P.S. Dear Themeco team, it is far past time to release seamless integrated support for srcset into the Pro builders. Please make this a priority. I know I’m not the only one who has asked, and the answer has stayed the same for over 3 years now.

Hey @adaptifyDesigns,

We understand this has long been requested however, there are some challenges to pull this off at least in Pro 4. For now, assuming you’re using a child theme, add the following line of code in the child theme’s functions.php.

add_filter( 'cs_enable_srcset', '__return_true' );

The purpose of the code is to enable srcset for any images not configured to use retina (double pixel density). This is not enabled by default because the implementation is subject to change in a future major release.

Please just note that though there’s a provision for the scrset which is the code above, we do not provide support for it. If you encounter issues with it, please consult with a 3rd party developer.

Thank you for understanding.

Hi Christian, thanks for sharing the filter. That is the same filter I used to enable the native SRCSET functionality. And after enabling it most of my image elements were no longer displaying correctly. They were blown out of proportion and/or cropped, which is why I suspect the Image Size & Position settings have some kind of conflict with the native SRCSET behavior.

I was hoping there might be someone in this community who had some experience successfully implementing srcset into a Pro website, and might be able to share some wisdom and best practices, etc.

@christian Do you have a list of recommended 3rd party developers with Pro-specific experience/expertise?

Also, would you mind sharing the challenges you are encountering in your attempt to integrate srcset with Pro 4?

Thanks!

Hello @adaptifyDesigns,

Make sure that the Retina option is disabled and your images at least 1200 pixels or wider.

Kindly provide us access to your site so that we can check your image element settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Regards.