magefan / module-lazyload

https://magefan.com/magento-2-image-lazy-load-extension
Other
53 stars 16 forks source link

Lazyload Page Builder element background images #45

Open toan-tam opened 1 week ago

toan-tam commented 1 week ago

Hi Magefan team,

Thank you for providing this amazing module! I'm currently using it and very happy with the features it offers. However, I've encountered an issue with Page Builder using row/column background images. The extension doesn’t lazy load them. Here’s a screenshot for reference: https://share.cleanshot.com/DlbpNpgf.

I’m aware of the workaround mentioned here: https://magefan.com/blog/lazy-load-css-background-images, but using a plain HTML markup element from the Page Builder would limit non-technical admins from easily updating background images.

Is there a better way to lazy load background images in Page Builder elements without affecting ease of use for non-technical admins?

Looking forward to your advice!

Thanks,
Toan

VikaTarnavska commented 4 hours ago

Hello Toan,

Thank you for reaching out. We're glad to know the extension is working well!

To enable image lazy load for Magento 2 CMS Blocks / Pages, you should add a new row at the bottom of our content and insert this HTML comment: <!-- MAGEFAN_LAZY_LOAD -->

It is important to use a new row at the bottom of the content, since if you add the command at the top of the existing block, it will be deleted.

Could you please give this a try and let us know how it goes?

Best, Viktoriia Customer Support Manager at Magefan