Support » Plugin: Instant Articles for WP » Instant Articles do not show images and videos within the post content

  • Hello


    Hi, I am using this plugin for my website but even after lot’s of trial, I am not able to make it display content images on Instant Articles for Facebook mobile app.
    Though it shows the first featured image but not the images that are inserted in the content.To understand what I mean to say, please look at these snapshots.

    In this snapshot , you can see “Facebook” is able to grab the featured image( under red rectangle). The same image is also visible as the header image when you see the main article.

    In this snapshot, you can see that – images are not visible under the body of the content ( missing image shown under red rectangle.). In similar ways , videos are also missing from the body of the content.

    Now I am sharing one more snapshot from one RSS feed grabber called “Feed Demon”, Here you can also see that the first “featured image” is visible but images under content are missing. Here is the snapshot

    After brainstorming a lot, it seems that the H2Rule is being applied (that turns the h6 into h2), and the image is lost in the process.

    See, Here is one code snippet for the posted content image from my actual website post:

    <h6><a href=""><img class="aligncenter size-full wp-image-918" src="" alt="math problem terrorist flight tomatoheart" width="640" height="404" srcset=" 640w, 300w" sizes="(max-width: 640px) 100vw, 640px" /></a>Graphical Image showing math equation</h6>

    After converting this into Facebook Instant Articles,this code gets transformed into this:

    <h2><a href=""></a>Graphical Image showing math equation</h2>

    So,Perhaps I need to add some custom rules to make this transformation work. I also noticed that perhaps these missing image are not wrapped under <figure> , how can I make it do so.

    In short, I am looking for a working custom rule so that it can dispaly content images under FB Instant Articles.

    My actual FBIA feed URL is: and I am currently using the latest version ( 4.5.2) of WordPress.

    Please help. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I don’t have a real solution for you, but you need to try to define your tag structure in the “Custom transformer rules” on the plug-in options.

    For instance, to add the images with captions, this is the code:
    {“rules”: [ { “class”: “CaptionRule”, “selector” : “p.wp-caption-text” }, { “class”: “ImageRule”, “selector” : “div.wp-caption”, “properties” : { “image.url” : { “type” : “string”, “selector” : “img”, “attribute”: “src” }, “image.caption” : { “type” : “element”, “selector” : “p.wp-caption-text” } } } ]}

    I hope it could help.

    Where can i edit this Code pls? Is it in the folder of the Plugin?

    @3p1demicz No, it’s in the plugin preferences, on wp-admin

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Instant Articles do not show images and videos within the post content’ is closed to new replies.