I took a look into the code and the issue seems to be that on load the img elements are scraped for the src attribute values, to store them in a variable. But at that point, the src holds the placeholder data uri from my plugin, so the lightbox tries to display that instead of the image that gets loaded later.
@florianbrinkmann Thank you for this report. I have a PR up that should fix this bug here: #1486. If you have time to test out the branch fix/lazy-load-lightbox We would appreciate it.
Describe the bug:
A user of my lazy loading plugin reported (https://wordpress.org/support/topic/plugin-compatibility-coblocks-gallery-lightbox/) that there are problems using it with CoBlocks’ lightbox for, for example, the offset gallery block.
I took a look into the code and the issue seems to be that on load the
img
elements are scraped for thesrc
attribute values, to store them in a variable. But at that point, thesrc
holds the placeholder data uri from my plugin, so the lightbox tries to display that instead of the image that gets loaded later.To reproduce:
Expected behavior:
Correct displaying of the image :)
Isolating the problem:
WordPress version:
5.4 RC2-47460