• Resolved haroldparis

    (@haroldparis)


    Hi Featured Images in RSS & Mailchimp Email Team !

    I’ve got a problem with the plugin I can’t correct.

    In my feed, WordPress add these two lines :

    <media:thumbnail url="https://positivr.fr/positivr.fr/wp-content/uploads/2018/01/image-une-centrale-solaire-tchernobyl-ukraine-560x293.jpg" />
    <media:content url="https://positivr.fr/positivr.fr/wp-content/uploads/2018/01/image-une-centrale-solaire-tchernobyl-ukraine-560x293.jpg" medium="image" />

    Why does it double the base url ?

    https://positivr.fr/positivr.fr/wp-content/&#8230; should be : https://positivr.fr/wp-content/

    I don’t understand where the problem is.

    It works fine in the content, but not here.

    Having the wrong URL here is problematic for feed readers and some apps.

    Feed example : https://positivr.fr/feed/

    Can you help ?

    Cheers !

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there,

    The feed images look ok:

    <img width="560" height="293" src="https://positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-560x293.jpg" class="webfeedsFeaturedVisual wpexpro-image wp-post-image" alt="" style="display: block; margin: auto; margin-bottom: 10px;max-width: 100%;" srcset="https://positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-560x293.jpg 560w, https://positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-768x402.jpg 768w, https://positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-1024x536.jpg 1024w, https://positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-696x364.jpg 696w, https://positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-1068x559.jpg 1068w, https://positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-803x420.jpg 803w, https://positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-390x204.jpg 390w, https://positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-300x157.jpg 300w, https://positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-888x465.jpg 888w, https://positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique.jpg 1200w" sizes="(max-width: 560px) 100vw, 560px" data-wpex-post-id="90896">
    

    as does the media:thumbnail inside the media:description:

    <media:thumbnail url="https://positivr.fr/wp-content/uploads/2018/01/x6d8tr1.jpg" />
    

    It’s a bit confusing that there’s another media:thumbnail section outside of that, as well as media:content, both have the double-domain issue:

    <media:thumbnail url="https://positivr.fr/positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-560x293.jpg" />
    		<media:content url="https://positivr.fr/positivr.fr/wp-content/uploads/2018/01/image-une-ecologiste-yannick-jadot-commission-europeenne-peche-electrique-560x293.jpg" medium="image" />
    

    Let me look into this more and see if I can duplicate the issue on a fresh install.

    This may be related to only the free trial or premium version offering media tag support. For continued support on any premium option issue, please open a ticket for premium support within the plugin.

    Thanks,
    Rob

    Thread Starter haroldparis

    (@haroldparis)

    Hey Rob,

    Thanks a lot for the answer.

    That’s not pretty, but I managed to remove the double base url through this code :

    add_action( 'rss2_head', function()
    {
        remove_all_actions( 'rss2_item' );
    
        function mediathumbnail_in_rss() {
            global $post;
            if(has_post_thumbnail($post->ID)) {
                echo '<media:thumbnail url="' . get_the_post_thumbnail_url($post->ID, "medium") . '" />
                <media:content url="' . get_the_post_thumbnail_url($post->ID, "medium") . '" medium="image" />';
            }
        }
        add_action('rss2_item', 'mediathumbnail_in_rss');
    
    } );

    If that can help.

    Cheers !

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

The topic ‘media:thumbnail & media:content url problem’ is closed to new replies.