I recently upgraded from Blazy 3.0.17 to 3.0.19. straight away, media fields rendered in a view using 'Blazy media' started giving trouble.
The images (whether in a HTML list, Unformatted list or Slick carousel) were first being rendered, then disappeared again, as blazy applied "b-loaded b-checked b-error" to the rendered image's classes.
None of the other settings of the media: loading settings, image styles, responsive images styles, made any difference.
Roll back to 3.0.18 the problem remained, roll back to 3.0.17 and all images are rendered correct again.
Comments
Comment #2
gausarts commentedThank you.
Does it happen to all images, or only one or two?
For regressions, no solid idea yet, but worth a try:
Revert this "js/src/dblazy.js":
https://git.drupalcode.org/project/blazy/-/blob/3.0.19/js/src/dblazy.js?...
to:
It was about deprecation removals.
Steps, only if unfamiliar:
gitkcommand or any tools to trace the changes.Please let me know your findings?
I haven't been able to see to it properly.
Patches are welcome if anyone beat me to it.
Comment #3
hatuhay commentedCause: Blazy's placeholder is a tiny inline SVG with no width or height. The browser treats it as an already-loaded image 150px wide. Blazy's check for "this image is already loaded" ($.isDecoded(el) in loadImage()) therefore passed for every element. Blazy then marked each image b-loaded and removed data-src, but never put the real URL into src.
Patch on the way
Comment #4
hatuhay commentedComment #5
hatuhay commented