Hello @fakhrur
Thank you for the support topic, You don’t need to add any scripts manually, the AMP plugin is smart enough to detect usage of an AMP component and it will include the required scripts for it.
eg: if you use the <amp-image-lightbox> tag in content or on a page the scripts required for it will be included.
but, is not working, how to use lightbox on my website? 🙁 help me plz
@fakhrur
You can use the lightbox settings on the image block (screenshot) and gallery block (screenshot).
You can also use lightbox attribute in image
eg:
<img class="alignnone size-medium wp-image-1691" src="https://amp-support.rt.gw/wp-content/uploads/2014/01/dsc20050315_145007_132-300x225.jpg" alt="" width="300" height="225" lightbox="" />
i already activate add lightbox on image, but not working, there is any optiom automate lightbox image
see this screenshoot
can you please share the URL where you are trying to implement lightbox
wait I just found out that you are using native images instead of amp-img, the lightbox feature is not available for native img yet.
Please visit AMP->Settings->Other->toggle OFF “Use native HTML image tag”
(screenshot)
sure, already deactivate, plz check again 🙂
@fakhrur
Not sure why the lightbox attribute is not being added, when you toggle ON the lightbox on the image block make sure to save the post.
can you please confirm that you are adding lightbox attribute to <img> tag and not <figure> tag
eg:
<figure>
<img src="pic_trulli.jpg" alt="Trulli" lightbox="">
<figcaption>Fig.1 - Trulli, Puglia, Italy.</figcaption>
</figure>
-
This reply was modified 3 years, 11 months ago by
Milind More.
i didnt know much more about adding <figure> , 🙂
i am adding image normaly using guten blocks btw 🙂
@fakhrur
This might be related to amp-wp/issues/7154
is there on going to fixed?
yeah thats issue same like me, i try to not aligned the image, lightbox also working, but if i, aligned center the image, its not working, i hope amp dev can fix it 🙂 thanks
@fakhrur It will be fixed in next minor release