loading="lazy" attribute for images added through the designer and CMS.loading="lazy" to <img> tags in custom code embeds if not using the designer.Implementing lazy loading for images in Webflow CMS can enhance your website's performance by delaying image loading until they need to be displayed. Here's how you can achieve this:
loading="lazy" attribute as per modern HTML standards. This is built-in for all images added via the designer.loading="lazy" attribute.
If you're looking to implement lazy loading manually, perhaps for images added via custom code instead of the designer:
loading="lazy" to the <img> tags within your custom code embeds.<img> tag includes loading="lazy" where applicable.
For images pulled in dynamically via CMS collections:
loading="lazy" does not interfere with desired behavior.
Webflow automatically applies lazy loading to images within its designer, including CMS images, using the loading="lazy" attribute. For custom code, you can manually add this attribute to your <img> tags. Always verify the implementation by checking the live site's HTML.