Archived topic
Update src and scrset logo attributes to include data-src and data-srcset
1 reply · Started by vast on June 21, 2020
Viewing posts 1–2 of 2
The generate_logo_output filter offers the option to alter the HTML code for the logo -https://docs.generatepress.com/article/generate_logo_output/.
What is the equivalent filter to dynamically add data-src and data-srcset as well as custom CSS to the image attributes? This is to utilize libraries such as lazysizes.
Hi there,
we don't recommend using lazy loading on logos - they generally cause issues such as layout shifting on initial load.
This archived topic is closed to new replies.