Re: Getting rid of "lazy" logo

Solved

Getting rid of "lazy" logo

Kari_M
Tourist
9 2 3

hello,

 

i am not liking my logo "blinking" from lazy loading. I was able to fix on desktop but the mobile is still lazy. I tried to do the same thing and delete 'lazy-img' but it deletes the logo all together. What or how to i need to edit this?

 

in: header.liquid

 

{% if logo %}
<div class="header__logo-image" data-logo-image>
{% comment %}Component lazy-img:default begin{% endcomment %}
{% render 'lazy-img', img: logo, size: logo_width_size: true, canvas: true, focal_point: logo.presentation.focal_point %}
{% comment %}Component lazy-img:default end{% endcomment %}
</div>
{% endif %}

{% if logo_mobile %}
<div class="header__mobile-image" data-logo-image-mobile>
{% comment %}Component lazy-img:default begin{% endcomment %}
{% render 'lazy-img', img: logo_mobile, size: logo_width_mobile_size: true, canvas: true, focal_point: logo_mobile.presentation.focal_point %}
{% comment %}Component lazy-img:default end{% endcomment %}
</div>
{% endif %}

Accepted Solution (1)

Kari_M
Tourist
9 2 3

This is an accepted solution.

Hello,

 

Thank you. For some reason deleting "render 'lazy-img' " would make the image go away, not sure why

 

but I found a way to make it work. Add the following in the line: Lazy: False or if it says Lazy: True - delete that or replace True with False

 

Screen Shot 2024-12-16 at 3.42.51 PM.png

 

Hope this saves someone else some time

View solution in original post

Replies 2 (2)

PaulNewton
Shopify Partner
7746 679 1617

Hi @Kari_M  👋 Not everyone has the same theme or those files.

Try and copy the contents of that snippet into another name it 'img' or somesuch replace the {% render 'lazy-img'  with {% render 'img'.

In the img snippet remove any lazy load attributes from elements and test.

 

Beyond that if you need this customization then contact me for services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


Kari_M
Tourist
9 2 3

This is an accepted solution.

Hello,

 

Thank you. For some reason deleting "render 'lazy-img' " would make the image go away, not sure why

 

but I found a way to make it work. Add the following in the line: Lazy: False or if it says Lazy: True - delete that or replace True with False

 

Screen Shot 2024-12-16 at 3.42.51 PM.png

 

Hope this saves someone else some time