Support » Plugin: WP Native Articles - Facebook Instant Articles Plugin for WordPress » Problems with featured images of articles, need help

  • Resolved faralight

    (@faralight)



    Hello, thanks for plugin.
    It is working well. But it seems like plugin delete featured images, if they reapets in the article. I have tried to add in functions.php

    /**
    * Remove the check_image_exists parser function.
    *
    * @return void
    */
    function wpna_custom_remove_check_image_exists() {
    global $wpna;
    remove_filter( ‘wpna_facebook_article_content_transform_node_img’, array( $wpna->wpna_facebook_content_parser, ‘check_image_exists’ ), 10 );
    }
    add_action( ‘wpna_facebook_article_pre_the_content_transform’, ‘wpna_custom_remove_check_image_exists’, 99 );

    But it still doesn’t show featured images.

    How to solve. I need that any image can be featured image, if they even reapets

    p.s. When I post article without featured image, I noticed that the header image is working

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author OzTheGreat

    (@ozthegreat)

    Hi,

    Thanks for getting in touch. Yes, if the featured image is repeated in the article we remove it, this is intentional as it’s actually part of the Instant Articles specification (Facebook will reject your review if they find the image repeated). If you wish to disable it you can add the code below to your theme’s functions.php file (make sure you’re using Version 2 of the parser).

    All the best.

    function wpna_custom_remove_check_image_exists() {
    	global $wpna;
    	if ( $wpna ) {
    		remove_filter( 'wpna_facebook_article_content_transform_node_img', array( $wpna->wpna_facebook_content_parser, 'check_not_featured_image' ), 10 );
    	}
    }
    add_action( 'wpna_facebook_article_pre_the_content_transform', 'wpna_custom_remove_check_image_exists', 99 );
    

    this code doesn’t help me, may be troubles with theme.

    What do you think, are there any ways? May be try ro autoedit url of featured image?

    P.S. I am not familiar with coding…

    p.s. I use WP Content Crawlew, which can use HTML manipulations when crawls images

    Plugin Author OzTheGreat

    (@ozthegreat)

    Hi,

    I’m sorry I’m not sure I understand your issue. If you add a featured image to a post (using the WordPress featured image meta box like this) does it not show in the Instant Article?

    All the best

    It doesn’t

    After publishing I have tried to change image into different image, but it still doesn’t work

    [ Please do not bump. ]

    I paste my link in https://developers.facebook.com/tools/debug/og/object/
    tried to push old button then new, so featured image worked

    But I should do manually all posts via this method

    how to automate?

    Plugin Author OzTheGreat

    (@ozthegreat)

    Hi,

    Ahh I see, that’s not the Instant Article but your og:image tag (the small card that appears in your Facebook news feed), our plugin doesn’t add that part I’m afraid. Could you send me a link to your Instant Articles RSS feed I’d like to check that your featured image is there in the actual article?

    Thanks

    Thanks, for you answer here is feed: graderoy–com/feed/facebook-instant-articles/

    Plugin Author OzTheGreat

    (@ozthegreat)

    Hi,

    Thanks for that. I’ve had a look and it does seem as though featured images are working in Instant Articles? I had a look at your page and all you Instant Articles have featured images (e.g. https://prnt.sc/hz77wh) and I checked the code on your site and it looks good (e.g. https://prnt.sc/hz78ad).

    As I mentioned above, I think the issue isn’t so much with instant articles but the social preview tags (the small card with the image and title on that appears in feed). Facebook does tend to cache the articles, and it does seem like a fairly common problem (see here and here or Google “wordpress update post facebook rescrape”). the simplest solution seems to be just using the debugging tool like you did previously to force a re-scrape. Though there do seem to be some automatic options if you look around.

    Hope that helps.

    Thanks for your answer.
    Is the size of image being issue?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Problems with featured images of articles, need help’ is closed to new replies.