• Resolved Danly_Dan

    (@danly_dan)


    Viewing the feed, I receive the following:

    <description><![CDATA[<img width="277" height="300" src="https://example.com/wp-content/uploads/2016/04/watermelon_melon_fruit-277x300.jpg" class="attachment-medium size-medium wp-post-image" alt="watermelon_melon_fruit" style="display: block; margin-bottom: 5px; clear:both;" srcset="//example.com/wp-content/uploads/2016/04/watermelon_melon_fruit-277x300.jpg 277w, //example.com/wp-content/uploads/2016/04/watermelon_melon_fruit-768x832.jpg 768w, //example.com/wp-content/uploads/2016/04/watermelon_melon_fruit-945x1024.jpg 945w, //example.com/wp-content/uploads/2016/04/watermelon_melon_fruit.jpg 997w" sizes="(max-width: 277px) 100vw, 277px" />Okay, so...

    As you can see, srcset is set to just “//example.com/…” and as such causes issues. A feature image that is less than the minimum size that does not get any resizing has no issue.

    Of note, I am using Cloudflare for SSL so that might be a contributor to the problem. I’ve read that causing issues with srcset, but it seems to only be a problem with the feed images inserted by this plugin.

    https://ww.wp.xz.cn/plugins/featured-images-for-rss-feeds/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Rob – 5StarPlugins / PressWizards

    (@presswizards)

    Hmm, it seems there’s a plugin that is rewriting the URLs, as my plugin by default only includes the featured image URL, and doesn’t add srcset info. So, whatever plugin is firing after my plugin appends the URL is the cause of the srcset URLs. I don’t have any control over it adding them that way. It should work fine if you also redirect all non-SSL traffic to SSL, perhaps look into doing that (using Cloudflare page rules or .htaccess file), keeping the full URL so it pulls in the correct file over SSL?

    I have a site that uses Cloudflare’s flexible SSL and the Cloudflare Flexible SSL plugin, and my plugin seems to work fine with it.

    taymless

    (@taymless)

    I had some issues with added sizes in my feed img tags and think this is being caused by the new responsive images in WordPress 4.4 (https://make.ww.wp.xz.cn/core/2015/11/10/responsive-images-in-wordpress-4-4/).

    I’ve found a way to disable responsive images (http://wordpress.stackexchange.com/questions/211375/how-do-i-disable-responsive-images-in-wp-4-4) and modified it’s only applied to the feed with this filter:

    add_filter( 'wp_get_attachment_image_attributes', function( $attr )
    {
        if(is_feed())
        {
            if( isset( $attr['sizes'] ) )
                unset( $attr['sizes'] );
    
            if( isset( $attr['srcset'] ) )
                unset( $attr['srcset'] );
        }
    
        return $attr;
    
    }, PHP_INT_MAX );
    Plugin Author Rob – 5StarPlugins / PressWizards

    (@presswizards)

    Hi there,

    Thanks for this, we may apply this to future versions to have the option to disable responsive images, if desired, as a simple checkbox.

    Thanks,
    Rob

    Thread Starter Danly_Dan

    (@danly_dan)

    Just wanted to close this out from my end.

    @taymless was spot on. I was finding posts cropping up about other people having similar issues post updating. Will likely implement his solution, but for now the SSL Insecure Content Fixer plugin is working to address the missing protocol of the srcset tag.

    It seems like a good idea to account for it in this plugin as RSS doesn’t seem right for the srcset tag anyways, but a option to override or allow would be good too.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘HTTPS feed, images added with broken srcset that omits https:’ is closed to new replies.