I have spent a lot of time hacking/munging how WordPress handles RSS output, as I often want different titles/image sizes etc. for RSS feeds than I do for the original web posts. I was just a bit unhappy to find out that WordPress’ automatic generation of responsive images (via the ‘srcset’ attributes) now adds this code to images in RSS files as well.
This is simply fixed by turning the srcset generation code off for RSS files:
if (is_feed()) {add_filter( 'wp_calculate_image_srcset_meta', '__return_null' );}
Hi! Where do I have to add this code?
Thanks,
Francisco
You can either add it to functions.php, or add it to any other php file that is loaded by functions.php