amp-img not showing when inside a lightbox and outside of viewport initially
Start with an <amp-list> containing <amp-img> sitting inside an <amp-lightbox>, and with <amp-img> scrolls into the viewport, the image fails to lazy-load and be displayed.
Demo page: https://randomtestapp-a5a6f.firebaseapp.com/amp-img-not-showing-on-lightbox.html Open up the lightbox, and scroll down, and you'll see empty image boxes.
Actually we encounter this kind of issue in various situation, the key problem is that while the <amp-img> is out of the viewport, it won't be rendered. Situations as follows:
- Multiple
<amp-img>in a<div>, in order to simulate the dynamic carousel; - Multiple
<amp-img>in a<amp-lightbox>, when we using this to implement our feedback dialog in our product detail page, the img is not yet in the viewport would not be rendered even when you scroll down to it, and that time, thesrcalready came back.
/to @aghassemi
@grahamle Thanks for reporting.
For 1. Using horizontally scrollable div to mimic a carousel is not supported in AMP yet, you would need to use amp-carousel for that.
For 2. If amp-lightbox is set to scrollable it would be supported but as the bug implies, it is broken. I am looking into fixing this ASAP.