Title: Wrong image (possibly wrong priority?)
Last modified: January 30, 2018

---

# Wrong image (possibly wrong priority?)

 *  [Liddika](https://wordpress.org/support/users/liddika/)
 * (@liddika)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/wrong-image-possibly-wrong-priority/)
 * Hello,
 * I am using WordPress Automatic Plugin ([https://codecanyon.net/item/wordpress-automatic-plugin/1904470](https://codecanyon.net/item/wordpress-automatic-plugin/1904470))
   to post articles to my website. However I noticed that it always posts the wrong
   image (the first one from the sidebar, rather than the featured image).
 * I’ve already been debugging everything for 2 days. The og:image tags are correct,
   Facebook scrapes the article correctly, however it seems when WordPress Automatic
   plugin is adding new posts using wordpress cronjob, Facebook Auto Publish does
   not yet have the featured image.
    This leads me to believe that Facebook Auto
   Publish is triggered before WP Automatic has fully added the post with the image
   to WordPress.
 * I see Facebook Auto Publish hooks into `transition_post_status` to get triggered,
   while WP Automatic uses `wp_insert_post` via wp cronjob.
 * I assume `transition_post_status` gets triggered before `wp_insert_post` and 
   that’s why it can’t retrieve the featured image picture?
 * What can I do?

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

 *  [anjalixyzscripts](https://wordpress.org/support/users/anjali94/)
 * (@anjali94)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/wrong-image-possibly-wrong-priority/#post-9920440)
 * Are you using shared link/attach your blog post as the posting method ?
    Facebook
   auto publish sets the image(from post content/featured image) as og:image so 
   that Facebook pick the correct image. It fetches the post contents as well as
   the featured image from database. The plugin auto publish only when the post 
   status is changed to publish,so transition_post_status hook is used . Since this
   is a premium plugin ,i cannot be of much help. Please contact [support desk](https://xyzscripts.com/support/).
   Thank you.
 *  Thread Starter [Liddika](https://wordpress.org/support/users/liddika/)
 * (@liddika)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/wrong-image-possibly-wrong-priority/#post-9927820)
 * Hello,
 * Thank you for getting back to me. Yes, that is exactly what I mentioned. If you
   look up the WordPress documentation, you’ll see that `transition_post_status`
   is used before `wp_insert_post`, and many plugins that are hooked into creating
   a post, use `wp_insert_post`.
 * I am using WP Automatic [https://codecanyon.net/item/wordpress-automatic-plugin/1904470](https://codecanyon.net/item/wordpress-automatic-plugin/1904470)
   along with [https://wordpress.org/plugins/nelio-content/](https://wordpress.org/plugins/nelio-content/)
   to keep the images external.
 * Both these plugins use `wp_insert_post`.
 * That’s why I assume, Facebook Auto Publish already shares the link on Facebook
   before the article has been properly saved in the database, which results in 
   wrong images.
 * Facebook Auto Publish should have the lowest priority so that it’s triggered 
   at the very end, to make sure every other plugin related to creating posts, has
   performed it’s task already.
 *  [anjalixyzscripts](https://wordpress.org/support/users/anjali94/)
 * (@anjali94)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/wrong-image-possibly-wrong-priority/#post-9929279)
 * When we use ‘wp_insert_post’,it will autoposted at the time of insertion,wordpress
   posts should be autoposted when it is published in wordpress,that’s why transition_post_status
   is used.
    The premium plugin is able to schedule posts,that’s a solution to this
   issue, or you should make the posts as wordpress scheduled posts,so that the 
   article has been properly saved in the database and the plugin will post at wordpress
   publish time(Or auto post only when editing article). Hope it helps. Thank you.

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

The topic ‘Wrong image (possibly wrong priority?)’ is closed to new replies.

 * ![](https://ps.w.org/facebook-auto-publish/assets/icon-128x128.png?rev=2124304)
 * [WP2Social Auto Publish](https://wordpress.org/plugins/facebook-auto-publish/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/facebook-auto-publish/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/facebook-auto-publish/)
 * [Active Topics](https://wordpress.org/support/plugin/facebook-auto-publish/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/facebook-auto-publish/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/facebook-auto-publish/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [anjalixyzscripts](https://wordpress.org/support/users/anjali94/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/wrong-image-possibly-wrong-priority/#post-9929279)
 * Status: not resolved