Jump to content

Doubt about "Lazy load media" in Fields > Pages


Recommended Posts

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.

Screenshot_8.png.d45c98d38cab90c3de835392450f8ade.png

Screenshot_2.png.132358dbb0afa3e277f6c11377a71351.png

My code

Screenshot_12.png.167700f403bb619415bdd1be13953f12.png

{{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

Screenshot_7.png.80a1b7d9e625c3040e727e903ffd99ef.png

 

-- Edited --

I notice that they only work when they are sent via attachment.

Edited by Hisashi
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...