- 🇬🇧United Kingdom aaron.ferris
Ive tested/reviewed this - looks good to me.
Setup
- Drupal 10.2.6
- Latest version of this module
- The proposed patch
- A custom image formatter
- Annotation as described in the OP
/** * Plugin implementation of the 'new image' formatter. * * @FieldFormatter( * id = "new_image_formatter", * label = @Translation("New Image Formatter"), * lazy_loader = TRUE, * field_types = { * "image" * } * ) */
Works as I would expect, the option to assign lazy_loader is in the field display config. The markup includes the class the module provides,
<img loading="lazy" src="" width="480" height="368" alt="Alt text" data-src="/sites/default/files/styles/large/public/2024-08/Screenshot%202024-07-31%20at%2015.27.29.png?itok=vSuZn-oA" class="lozad" data-vd-id="element-qak7f">
RBTC
- Status changed to RTBC
5 months ago 10:19am 2 August 2024 - First commit to issue fork.
- Status changed to Fixed
5 months ago 10:53am 2 August 2024 - 🇬🇧United Kingdom psebborn
Thanks all! Merged; will be added to the next release
Automatically closed - issue fixed for 2 weeks with no activity.