• I started having trouble with my rss feed validating with a previous theme, and previous version of WP; so today I upgraded to the latest WP and versions of plugins. That did not help. I chose a different theme. I deactivated all plugins, narrowed the problem down to image attributes (srcset and sizing, and also captions) on a few posts. With deleting of images and re-uploading them, I got the site to validate correctly with the plugins reactivated… but the feedreader is still refusing it. (Inoreader) The uploader/library seems to disagree with xml feeds????

    The errors listed in the validator are that the image uploader is putting on attributes that feeds don’t like (multiple size options, captions, links) and I have to remove formatting on every image I upload now, and on some older posts as well.

    How can I prevent this in the future? Is there a better image uploader or media library? I don’t mind sizing and compressing myself, but having to remove formatting for each image uploaded is a pain (and ugly). My blog is here: https://wildwoodsoap.com/blog/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter JudithM

    (@judithm)

    Oh and the theme I am using now is Activello.

    Well, adding the following in your theme’s functions.php file will get rid of them completely, not just the RSS feed:

    add_filter( 'wp_calculate_image_srcset_meta', '__return_false' );

    Thread Starter JudithM

    (@judithm)

    Thank you; what will that do to image sizing? And how do I do that? Is that something I have to do via ftp?

    (Is it the theme? Should I look for a different spare & simple theme that might not conflict with the image uploader/resizer and allow me to use captions and links?)

    Actually, this would be better since it will only remove them from the RSS feed:

    function remove_rssfeed_srcset() {
       if (is_feed()) {
          add_filter( 'wp_calculate_image_srcset_meta', '__return_false' );
       }
    }
    add_action('pre_get_posts', 'remove_rssfeed_srcset' );

    It will behave normally everywhere else. The functions.php should be in the /wp-content/themes/activello/ directory.

    If you go to the Dashboard -> Appearance -> Editor. It should let you edit the Theme Functions (functions.php) file and add it to the bottom.

    Ideally, however, you should be making changes using a Child Theme so that if/when the theme is updated you don’t loose your changes.

    Thread Starter JudithM

    (@judithm)

    Oh, thank you; is that in the customizer? (appearance->customizer>activello options>other? (there’s a box for adding custom CSS, is that where I would add that?)) .. I don’t see a separate Editor within Appearance other than that.

    I’ll look into child themes now.

    Thread Starter JudithM

    (@judithm)

    My goodness.. the child themes sound more complicated than they used to! Is there a simple child theme plugin that will allow me to edit the functions.php but not allow me to get into too much trouble?

    Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘RSS feed errors because of image formatting’ is closed to new replies.