My guess is that there are things in some of your other plugins that are causing this.
I see 4 things that should not happen:
- The photos are getting an additional attribute,
data-lazyloaded="1"
. This is being injected in PHP by a lazy loading plugin, which really shouldn’t be doing this since all of Photonic’s photos have an explicit directive to prevent lazy loading.
- The photos are getting an additional class via JavaScript,
litespeed-loaded
. Again, this is coming from a different plugin.
- There is a
noscript
node inserted after every Photonic photo via PHP – again, this is coming from a different plugin.
- Each photo’s caption is getting forced to have an attribute,
style="width: 1px;"
via JavaScript. This is happening probably via Photonic’s JavaScript.
While ultimately #4 is the one that is breaking your captions, it is likely that the first 3 are causing Photonic’s JS to set the 1px width. This is because Photonic tries to determine the width of your photo and then assigns the width of the caption. But, if you have a lazy-loading plugin, that is probably replacing Photonic’s photos with a 1px wide placeholder (again, it really shouldn’t since Photonic has a loading="eager"
attribute set on it). The 1px placeholder is causing this issue.
Long story short: you will need to disable your lazy loading plugin, or prevent it from targeting Photonic’s galleries.