Add Loading Attributes to the Native HubSpot Image Module


Native HubSpot image modules should have the option to add loading attributes to the resulting <img /> tag produced in the HTML markup. According to Can I Use... roughly 70% of users globally are using browsers that support the native loading attribute, and the attribute does not hurt user experience or SEO on older browsers.

The attribute could be implemented similarly to the width and height attributes in the current image module, however instead of a number field could be displayed as a select field with options for "auto" "lazy" and "eager."

As of right now, to implement lazy loading on a template built with the visual builder, a custom module needs to be created to add lazy loading functionality. Then, all existing image modules must be replaced and repopulated using the new version. A simple toggle would save developers and marketers a significant amount of time by eliminating the need for that content re-entry process.

4 Replies
Status updated to: In Planning
HubSpot Product Team

Thank you for submitting this idea! We are currently planning the implementation. Thank you!

Participant | Elite Partner

Awesome, thanks @wspiro!

Not applicable

@wspiro Do you have a timeframe for delivery? We have several clients getting hit pretty hard by this and the fix to the core module would be much more effective than reworking every image instance.

HubSpot Product Team

Hey @Anonymous - Thanks for your interest in lazy loading for images! We’re close to getting this functionality out to all image fields so after the update, any custom modules created with image fields can set up lazy loading for images. We’ll have documentation and an announcement out soon, so keep an eye out!