Hisashi Posted July 1, 2021 Posted July 1, 2021 (edited) Hello, Have the impression that Lazy load media doesn't work when images are loaded from an upload field on Record, can I be wrong, can anyone confirm me? I put in several heavy images to test, and they started to load everything at once. My code {{if $formValue}} <div class="ipsGrid ipsGrid_collapsePhone"> {{foreach $value as $file}} <img src="{file='$file' extension='cms_Records'}" class="ipsImage" alt="{$record->_title}"> {{endforeach}} </div> {{endif}} Inspecting -- Edited -- I notice that they only work when they are sent via attachment. Edited July 1, 2021 by Hisashi
Hisashi Posted July 2, 2021 Author Posted July 2, 2021 Hello @opentype, you use Pages, know any information about?
opentype Posted July 2, 2021 Posted July 2, 2021 Well, you create the code yourself. There won’t be lazy loading unless you code it in. Personally, I would just add native lazy loading like: <img src="{file='$file' extension='cms_Records'}" class="ipsImage" alt="{$record->_title}" loading="lazy"> I don’t have IPS’ custom lazy loading code memorized, since I don’t use that on any of my websites. Hisashi 1
Hisashi Posted July 2, 2021 Author Posted July 2, 2021 15 minutes ago, opentype said: Well, you create the code yourself. There won’t be lazy loading unless you code it in. Personally, I would just add native lazy loading like: <img src="{file='$file' extension='cms_Records'}" class="ipsImage" alt="{$record->_title}" loading="lazy"> I don’t have IPS’ custom lazy loading code memorized, since I don’t use that on any of my websites. I understand, I still thought about adding lazy code, but I thought it would give some conflict or something, because in theory already had it in the software
Recommended Posts