Jump to content

Recommended Posts

Posted (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.

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
Posted

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. 

Posted
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

  • Recently Browsing   0 members

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