fb-instant-articles icon indicating copy to clipboard operation
fb-instant-articles copied to clipboard

problem with lazy load

Open lubimow opened this issue 7 years ago • 9 comments

I'm using the Wp-rocket plugin. When I enabled lazy-load, images in the article instant articles began to appear in this form:

<img src="data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs="/>

How can I fix this?

Version Info

  • Plugin version: 4.0.6
  • WordPress version: 4.9.4
  • PHP version: 7.1

lubimow avatar Feb 13 '18 12:02 lubimow

Hi @lubimow, thanks for reporting this issue. Since this is related to compatibility with a third-party plugin, our team will treat it as a feature request, so it will be prioritized with the rest of requests.

pestevez avatar Feb 16 '18 13:02 pestevez

Hey guys,

I am Arun Basil Lal, I work for WP Rocket and I just wanted to share couple of insights.

WP Rocket already has checks in place to disable LazyLoading on feeds and doesn't show up on the default WordPress feeds. Here is the part of the code that corresponds to it: https://github.com/wp-media/wp-rocket/blob/master/inc/front/lazyload.php#L139

If you have any questions related to it, please do not hesitate to let us know.

Best regards.

arunbasillal avatar Feb 19 '18 10:02 arunbasillal

@pestevez Please read the comment above

lubimow avatar Mar 01 '18 19:03 lubimow

Hi @lubimow

Put this code in Custom Transformer Rules.

{
    "rules": [{
        "class": "ImageRule",
        "selector": "img[data-src]",
        "properties": {
            "image.url": {
                "type": "string",
                "selector": "img",
                "attribute": "data-src"
            }
        }
    }]
}

maungthuu avatar Mar 09 '18 04:03 maungthuu

@maungthuu Thanks, this solved my problem

lubimow avatar Mar 10 '18 12:03 lubimow

@lubimow glad it helps.

maungthuu avatar Mar 15 '18 03:03 maungthuu

We have the same problem. I've added the custom rule above to our IA plugin. Do I have to go back and republish all affected articles now?

Singletrackmark avatar Mar 24 '18 12:03 Singletrackmark

@Singletrackmark you need to update affected articles again.

maungthuu avatar Mar 30 '18 07:03 maungthuu

@maungthuu Hey. I again do not see a link to the image. Help, what to do?

lubimow avatar Mar 31 '18 20:03 lubimow

This issue has been marked stale because it has been open for 30 days with no activity. If there is no activity within 7 days, it will be closed. This is an automation to keep issues manageable and actionable and is not a comment on the quality of this issue nor on the work done so far. Closed issues are still valuable to the project and are available to be searched.

github-actions[bot] avatar Oct 18 '22 00:10 github-actions[bot]