Announcement

Collapse
No announcement yet.

Lazy Load Option for ReadyTheme Image sections

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Brennan
    replied
    Shadows template code by default has logic to support this in certain areas such as the logo, hero banner and product lists. For example:

    Code:
    <mvt:if expr="g.storefront_hero_image:link_dest">
    <a class="x-hero" href="&mvt:global:storefront_hero_image:uri;" target="&mvt:global:storefront_hero_image:link_tar g;">
    <img src="&mvte:global:storefront_hero_image:image;" alt="&mvte:global:storefront_hero_image:image_alt; " loading="lazy">
    </a>
    <mvt:else>
    <span class="x-hero">
    <mvt:item name="readytheme" param="image( 'storefront_hero_image' )" />
    </span>
    </mvt:if>
    But I agree with you, we can find ways to make this easier so it's not all in template code logic.

    Leave a comment:


  • Lazy Load Option for ReadyTheme Image sections

    Just what the subject says.

    Ad a checkbox on the Edit ReadyTheme Image box to use the HTML5 attribute loading="lazy".
Working...
X