• Resolved ehj-52n

    (@ehj-52n)


    Version 3.7.4 still breaks the display of images.

    Downgrading to version 3.7.2 solves this issue as outlined in previous posts in this forum.

    The problem seems to be the handling of the srcset attribute of the image tags in the rss feed content.

    See https://blog.52north.org/feed/ and search for <img loading="lazy".

    There, you see a single entry in the src attribute and an additional srcset. This results in an css entry on our main page requesting everything within the srcset as background for the blog post item. This request again, fails on our server, because the url of the srcset‘s content being url encoded does not exist.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Its a too greedy regexp in “public function feedzy_scrape_image( $string, $link = ” )”. Here is a test and a fix for it (change “\/\/.*\.” to “\/\/.*?\.”)

    <?php
    
    $string = '<img width="400" height="300" src="https://blog.seibert-media.net/wp-content/uploads/2020/10/Google-Meet-Beitragsbild.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Google Meet Teaser" loading="lazy" srcset="https://blog.seibert-media.net/wp-content/uploads/2020/10/Google-Meet-Beitragsbild.png 400w, https://blog.seibert-media.net/wp-content/uploads/2020/10/Google-Meet-Beitragsbild-300x225.png 300w" sizes="(max-width: 400px) 100vw, 400px">';
    $pattern = '/src=[\'"](.*?:\/\/.*\.(?:jpg|JPG|jpeg|JPEG|jpe|JPE|gif|GIF|png|PNG)+)[\'" >]/';
    # BUGFIX:
    # $pattern = '/src=[\'"](.*?:\/\/.*?\.(?:jpg|JPG|jpeg|JPEG|jpe|JPE|gif|GIF|png|PNG)+)[\'" >]/';
    
    preg_match( $pattern, $string, $hits );
    if($hits[1] != 'https://blog.seibert-media.net/wp-content/uploads/2020/10/Google-Meet-Beitragsbild.png') {
    	print "\nERROR!\n\n" . $hits[1] . "\n";
    } else {
    	print "All OK";
    }

    Hotfix: place in any plugin or theme:

    add_filter( ‘feedzy_retrieve_image’, function($the_thumbnail, $item) {
    return preg_replace(“/\”.*/”, “”, $the_thumbnail);
    }, 10, 3);

    • This reply was modified 3 years, 2 months ago by gartentechnik.

    Problem is fixed with version 3.7.5. Thanks.

    Hi @ehj-52n!

    As @gartentechnik mentioned above, this issue is solved in the latest update of Feedzy.

    Thank you and have a nice day!

    Thread Starter ehj-52n

    (@ehj-52n)

    @gartentechnik @luciamarinescu

    Thank you very much for your time and support.

    I can confirm that with version 3.7.5 our problem with the post image retrieval is solved as works again.

    THANK YOU VERY MUCH!

    Wonderful, we are happy to hear the image retrieval is working properly again for you with the latest update!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘3.7.4 still breaks images’ is closed to new replies.