Jump to content

Lazy load in 3rd-party resources


Go to solution Solved by newbie LAC,

Recommended Posts

Posted

Hello,

16 hours ago, sobrenome said:

I have changed the template userPhoto to add the lazy loading, but when I insert the <div data-ipsLazyLoad> wrapping the image it breaks the website design. Is it possible to add lazy loading for profile images in the next release? 

You can omit the wrapper

Since 4.4.3 you can use lazy loading without wrapper.

Works only on front end (if defined core.front.core.app controller).

Works anywhere for ajax calls

16 hours ago, sobrenome said:

the template userPhoto

Find 

src='{$member->photo}'

change to

{{if settings.lazy_load_enabled}}src='{expression="\IPS\Text\Parser::blankImage()"}' data-{{endif}}src='{$member->photo}'

 

Posted
On 7/23/2019 at 6:30 AM, newbie LAC said:

Works only on front end (if defined core.front.core.app controller).

There is a problem in embed content. The profile image does not load:

1945368852_CapturadeTela2019-07-24s11_40_21AM.thumb.png.dbd669440b216c356d75b6a0604fb795.png

Posted (edited)
37 minutes ago, sobrenome said:

There is a problem in embed content. The profile image does not load:

There is no js on embed page

Use next code

{{if settings.lazy_load_enabled and request.do != 'embed'}}src='{expression="\IPS\Text\Parser::blankImage()"}' data-{{endif}}src='{$member->photo}'

 

Edited by newbie LAC
  • 9 months later...
Posted

Is there a way to control the lazy load settings?

On some pages of my community lazy load does not take effect bacause it loads the resources to soon. I

s there a way to set lazy load to start requesting the content when the user is closer to it?

  • Recently Browsing   0 members

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