Announcement

Collapse
No announcement yet.

Lazy Load Option for ReadyTheme Image sections

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

    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".
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    #2
    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.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment

    Working...
    X