Jump to content

Featured Replies

Hello,

 

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

 

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}'

 

Thanks a lot!!!!!

awkward funny dance GIF

 

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

 

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

I will test it! Thanks !

the rolling stones GIF

Now it seems to be perfect! Thanks a lot! If I find another "bug" caused by the hack I will report here. So far, so good.

  • 9 months later...

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?

No, there are no configuration options for it. Resources should load as they approach coming into view.

Recently Browsing 0

  • No registered users viewing this page.