- Issue created by @rajeshreeputra
This issue proposes the implementation of lazy loading for off-screen images in the Acquia DAM. By adding the loading="lazy"
attribute to the embed option for images, we can enhance the performance of web pages by deferring the loading of images that are not immediately visible in the viewport. Currently it is available with download and sync option.
Install Drupal
Install Acquia DAM & media_library
Authenticate site in the configuration and then authorize the user
Create Content type and add media field with Acquia DAM: Image
bundle selected.
Edit Acquia DAM: Image
media type and check the Download and sync option & save changes.
Create page and add DAM assets.
Verify the loading="lazy"
attribute is available with image tag.
Edit Acquia DAM: Image
media type and uncheck the Download and sync option & save changes.
Visit page and verify the loading="lazy"
attribute is not available with image tag.
Add the image_loading
attribute into the EmbedCodeFormatter
.
Active
1.1
Code