Lazy Load Option for ReadyTheme Image sections

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bruce - PhosphorMedia
    Developer Partner











    • Mar 2006
    • 11256

    #1

    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
  • Brennan
    Super Moderator









    • Jun 2009
    • 3481

    #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; " [COLOR=#c0392b]loading="lazy"[/COLOR]>
    </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