Problem/Motivation
Gallery paragraphs doesn't use lazy loading at all (no blazy, nor native lazy loading)

Steps to reproduce
Proposed resolution
Maybe its a D9 core issue? https://www.drupal.org/project/drupal/issues/3192234
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|
Issue fork drowl_paragraphs-3344645
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
thomas.frobieterComment #3
thomas.frobieterComment #4
thomas.frobieter@anybody: Probably install the patch for D9? https://www.drupal.org/project/drupal/issues/3192234#comment-14852035
Edit: Tried the patches, they only add width + height attributes to responsive images.. what is also a good thing. Still no lazy attribute.
Edit 2: https://www.drupal.org/project/drupal/issues/3192234#comment-14791119 So this patch will never be implemented in D9 .. so we might better skip this since D10? :/
Comment #5
anybodyYep, we'll wait for the Drupal 10 #3192234: Apply width and height attributes to allow responsive image tag use loading="lazy" fix and see if it's solved with that.
Comment #6
anybodyWe just ran into this issue on our Drupal 10 projects. Reopening!
Comment #7
anybodyComment #8
anybodyFirst needs to be fixed upstream in: #3356042: drupal_image() needs #width / #height values for fully working image cache scale, lazy-loading and img attributes
Comment #10
anybodyOkay. Lazy loading is added. Still we found out drupal_image() in twig_tweak has some flaws. For example:
are not provided as parameters and set as attribute values instead of using the theme_image properties. Furthermore
are not provided, which leads to missing width / height calculation by image styles in core!
But that's not part of this issue, we should monitor the twig_tweak issues I'll create separately.
Ready for review!
Comment #12
thomas.frobieterComment #13
anybodyComment #15
anybodyFollow-up for twig_tweak: #3356042: drupal_image() needs #width / #height values for fully working image cache scale, lazy-loading and img attributes