fb-instant-articles
fb-instant-articles copied to clipboard
problem with lazy load
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
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.
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.
@pestevez Please read the comment above
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 Thanks, this solved my problem
@lubimow glad it helps.
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 you need to update affected articles again.
@maungthuu Hey. I again do not see a link to the image. Help, what to do?
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.