Feb 11, 2019 2:59 AM
Would like to ask for assistance, does anyone knows how to implement lazy loading in images (referring to hubl images tags) to web pages?
I have found this link in the community but seems that the questions was not answered thou there was a section that was marked as solution, https://community.hubspot.com/t5/CMS-Development/how-to-implement-lazy-loading-in-hubspot-pages-not-....
This article, https://www.bluleadz.com/blog/lazy-loading-images-on-hubspot helps but looks like its good to use if you are working with <img> tags and not for hubl image tag.
If someone knows how to implement lazy loading with hubl image tags please let me know.
Nov 13, 2020 5:12 PM
For those who find this thread in the future. Image fields in custom modules support lazy loading now.
We recommend implementing browser level lazy loading and our default snippet for the image field uses it.
Feb 14, 2019 11:16 AM
Feb 18, 2019 5:41 AM
Apr 11, 2020 9:10 PM
if you use AMP dont use these lazy load images like lozad on blog post images. Or the Hubspot AMP parser will remove all your images on AMP pages.
This happens due when converting <img> tags to <amp-img> Hubspot will strip completely all tags that dont have a valid src property. Also it will strip and data-src property. So no images will be displayed on AMP pages.