Welcome to TalkGraphics.com
Results 1 to 10 of 17

Hybrid View

  1. #1
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,901

    Default Re: Image Lazy loading

    Quote Originally Posted by Tessi View Post
    This Thread started on 08/21/22 with: "These sorts of things are always churning through changes".
    Now almost 2 years later I would like to ask whether the information on this is still up to date?
    I was very pleased with Acorn's simple explanation of how to use it. I tried to answer the question with Google about what the XDA version is and whether I have it with my WebDesigner+.
    But I couldn't answer the question -.-

    My second question concerns lazy.htm
    In the example with lazy.htm, the rectangles with the codes in the placeholders are very far apart. Is that mandatory?
    Because if I put ALL of my lazy loaded images of the entire website into the lazy.htm, it will be a very, very long lazy.htm
    Tessi, welcome to TalkGraphics.

    To find your version, open WD+ and pick Help > About...
    For me, I get "Xara Designer Pro+ 23.8.0.68981 SL x64 Apr 3 2024".

    Xara has yet to implement loading="lazy" as a user-selectable attribute.

    You stack and name your full size images in lazy.htm as you like.
    You can place them in Layers for better control but do ensure the layer name is preceded with a exclamation make (e.g., !layer05) so that the images are still published even when the layer is hidden.
    I stayed with JPEGs for simplicity but using WebPs would be better when you have 100s of images.

    The implementation where the loading="lazy" is used needs that page to be quite long so that those not is the immediate viewport are not fetched.
    In other words lazy load those below the fold. Ideal for SmartPhones as scrolling is an easy action to effect.
    Scrolling near a lazy image usually then loads that in around 10ms so no one really notices it appearing, it is just there.

    The concept is even more use when you have lots of YT videos. It works for IFRAMEs too.

    I have never tried it for images that have Xara Web Animations applied so it doesn't solve everything.

    Perhaps we should crowdnag Xara to implement it.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  2. #2
    Join Date
    Apr 2024
    Location
    Berlin
    Posts
    3

    Default Re: Image Lazy loading

    Hi Acorn

    Thank you very much for the nice welcome.
    I have the version: Xara Web Designer+ 23.0.68981 SL x64 Apr 3 2024
    Is this sufficient?

    I have jpg images throughout the website that are displayed by a code in the htasses file in webp.
    I hope that doesn't interfere with lazy loading?
    And yes, Xara should have implemented lazy load long ago.
    Others finally did it too.

    Tessi

  3. #3
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,901

    Default Re: Image Lazy loading

    Tessi, your version is more than sufficient.

    You'll have to explain what you mean by JPEGs coded in the .htaccess as WebP.

    If you have ticked the WebP option in Web Properties > Websites > Include WebP images, then Xara publishes both JPEG and WebP so you can picked either as WebP is fully rendered in all major browsers for over three years now. Both filetypes are uploaded but are only used when called so you could pick 'n' mix.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  4. #4
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,936

    Default Re: Image Lazy loading

    Perhaps this Acorn?:

    LINK
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  5. #5
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,901

    Default Re: Image Lazy loading

    Quote Originally Posted by Egg Bramhill View Post
    Perhaps this Acorn?:

    LINK
    Cheers Egg, totally no need for this for Xara rendering checks if the browser supports WebP and handles it from there.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  6. #6
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,936

    Default Re: Image Lazy loading

    No Acorn. In your example file your placeholder specifically calls for a jpg image:

    <img src='index_htm_files/bear.jpg' width=100% height=100% loading='lazy' />
    Therefore it will never load a .webp image, only the bear.jpg image. The script I linked to endeavors to call the webp file if the browser can handle it but if it can't (i.e. Safari) it loads the .jpg equivalent.

    Not that I've got that js script working via .htaccess though
    Last edited by Egg Bramhill; 04 May 2024 at 02:17 AM.
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  7. #7
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,936

    Default Re: Image Lazy loading

    On the issue were you use the default.jpg
    I believe it's pointless having all images lazy loading. You need to have images within the 'above the fold' load normally which is what I've done in my demo. The image tiger.jpg is not lazy loaded and all the others are.

    I find you always need a non-lazy image near the page bottom to stop the first lazy one loading right off.
    I can't understand why you state these images need to be placed at the bottom, it appears to work fine if they are within the 'above the fold' section.

    DEMO
    Attached Files Attached Files
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •