Search code examples
wordpressfacebook-instant-articles

Instant article and repeating image


I received this general warming:

General Warnings: Repeating Cover Image and First Image: The cover image and the image '9iememaison.quebec_v1xi5heeg9_8dqdz.png' seem to be the same or almost the same image. Please consider removing or replacing one of the images.

So I dug into the internet and I found nothing - except this: https://wordpress.org/support/topic/same-image-displayed-twice
"I performed the preg replace on function "get_the_content()" of "class-instant-articles-post.php" just before returning the variable $this->_content;"

But my problem is that my cover image and first image are the same. How do I either remove the cover image, or rename the first image in a way like WordPress and instant article thing? It's an other image but at the moment it's the same image, because my feature image on my website and the thumbnail generate and image use in post are all the same. I don't use different image, so the best way is maybe like making a WordPress function that:

  1. Copies the image
  2. Renames the image
  3. Puts that link in the post and if image is update then this image also.

Or maybe I'm just going to deep and there is an easier way to fix this.I didn't find it after checking all the instant article wp support, and looking through the web.


Solution

  • The best way to solve this, if you often have this situation, is probably to disable the Cover Image entirely by hooking into the plugin.

    This can apply even if the error/warning doesn't show. I have found it doesn't show a warning when the images are pretty much exactly the same, which is strange, only when they are very different in size but same content/name.

    Haven't found a solution for disabling Cover Image. Will hopefully update this if I end up having to create one.

    Here's another relevant thread: https://wordpress.org/support/topic/general-warningrepeating-cover-image-and-first-image/#post-8731646

    and a very relevant github ticket: https://github.com/Automattic/facebook-instant-articles-wp/issues/57