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: The challenge of mobile images - discussion

    Bill, here is a method that breaks down the approach, hopefully into bits that are easier to grasp.

    All your master hi-res images are in a Masters folder.
    You drag an image from Masters onto your design page and it renders as normal.
    What you have created is a replica of the Master image as you probably adjusted its size to fit the page.
    It will be given a numeric filename unless you apply its Image Filename.
    At the same time your Master image is now part of your design file and occupies a large part of the design file size.
    Yes you can Optimise Images but unless you do have a Masters folder and subsequent changes will max out as this images 96/192dpi for its fitted dimensions.

    Instead, you create a box the size of what you want the image to appear as on the design page.
    You then use its Web Properties > Placeholder > Replace with graphic file and Browse to the file in the Masters folder.
    What you now have, when you save your design, is an external assets folder containing the master image, full size.
    Nothing is added to the Bitmap gallery unless you have ticked the Regenerate option. This makes a scaled replica of your master image, which can still add into the the design file storage.

    Undaunted, you realise that you can use a free tool to create thumbnails of your master images and create a sub-folder to hold them.
    Assume they have the same image filename or something very similar for easy reference.
    You can now drag the thumbnail and resize it to what you want.
    You have no calculations to perform but you have to link to your masters somehow.
    A browser will not use a local filestore link as this is a security risk.

    Luckily, the Replace with graphic file option can be put to use.
    This time use it with any shape on the design page for any graphic file at all.
    Ensure Regenerate is unticked to avoid any addition into the Bitmap gallery.
    Now locate the newly created external assets folder where this image has been copied.
    Delete that and instead copy in all the master images you expect to use.

    Here comes the sleight of hand.
    For each resized and placed image in your design, open its Placeholder Body and insert:
    <img id="unique image identifier" src="<source path>/<A nice image filename>.jpg" alt="describe the image" loading="lazy" width=100% height=100% />
    Change the id, set the src to 'index_html_files/<master-image>.<ext>, describe the image in alt.

    For your Hero image, remove the loading="lazy" parameter.
    This allows Lighthouse and Insights to be happy to find an image early on.
    Do the same for any image within the height of the expected viewport, i.e., before the client scrolls down.

    You can use Xara to create the thumbnail.
    Drop a master image onto the design. Yes, mega size alert.
    Clone it and make the clone very small.
    Create a Bitmap Copy of this small clone. try 64px for its longest side.
    Resize and fit to fully cover the original.
    Delete the original.
    When you save and re-open the design file, the original image will have disappeared from the Bitmap gallery, as any unused bitmaps (nowhere on any page or layer) will be deleted from the file.

    A long way round!
    What you are trying to achieve is all you large images to end up as external assets.
    You can then drag it onto the design, and make a very small thumbnail copy.
    Then you can Replace with graphic file and rescale over the original.
    When you delete the original and save and re-open you have a lumpy thumbnail in the design but on render, the original in all its clarity.
    The lazy loading step is the killer addition.

    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
    Dec 2006
    Location
    Melfort, Saskatchewan Canada
    Posts
    1,018

    Default Re: The challenge of mobile images - discussion

    That’s a clear example even I can understand Acorn. Step by step for even non coders. Thanks.
    Bill Wood
    Charity Web Design
    XARA Pro+. WD17, Designer 17. Premium packages.

  3. #3
    Join Date
    Dec 2006
    Location
    Melfort, Saskatchewan Canada
    Posts
    1,018

    Default Re: The challenge of mobile images - discussion

    Acorn said …… What you set up in Main for a fantastic Transition website may not be effective for a Variant where a Scrolling website would be better.
    Xara does not allow a mixing of Conventional/Scrolling/Presentation/Transition.
    I far prefer Conventical as each page is its own HTML page with its own Background.
    Yet, Mobile rarely needs fancy transitions or Backgrounds so v. Scrolling is good enough.

    So you can have a joint design for both Main and Mobile Variant as Transition.
    When happy, clone off and delete Main and change it to Scrolling and you have a mobile site.
    Clone off the Mobile variant and you have a main site.”

    I like the above idea Acorn. But I don’t understand “as transition” and clone off and delete. I’m certainly not an expert, but a one page mobile site might also be achieved by putting everything on the index page. The other pages remain in the design but no linkage in phones. Correct?
    Bill Wood
    Charity Web Design
    XARA Pro+. WD17, Designer 17. Premium packages.

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

    Default Re: The challenge of mobile images - discussion

    Quote Originally Posted by bwood View Post
    Acorn said …… What you set up in Main for a fantastic Transition website may not be effective for a Variant where a Scrolling website would be better.
    Xara does not allow a mixing of Conventional/Scrolling/Presentation/Transition.
    I far prefer Conventical as each page is its own HTML page with its own Background.
    Yet, Mobile rarely needs fancy transitions or Backgrounds so v. Scrolling is good enough.

    So you can have a joint design for both Main and Mobile Variant as Transition.
    When happy, clone off and delete Main and change it to Scrolling and you have a mobile site.
    Clone off the Mobile variant and you have a main site.”

    I like the above idea Acorn. But I don’t understand “as transition” and clone off and delete. I’m certainly not an expert, but a one page mobile site might also be achieved by putting everything on the index page. The other pages remain in the design but no linkage in phones. Correct?
    Bill, it is a method to ensure both site designs have the identical URLs to each page. You then have a one-to-one relationship so you could manfully force a change to either path to toggle between the main and the mobile site.

    It is more of a problem for a conventional main to a scrolling mobile of just one page; you would have to juggle main pages with different URLs to a mobile one-page site that had targets instead.

    I reckon I'll have to build a few examples...

    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

  5. #5
    Join Date
    Dec 2006
    Location
    Melfort, Saskatchewan Canada
    Posts
    1,018

    Default Re: The challenge of mobile images - discussion

    Acorn … clarification on your chunk of code ….

    Here comes the sleight of hand.
    For each resized and placed image in your design, open its Placeholder Body and insert:
    <img id="unique image identifier" src="<source path>/<A nice image filename>.jpg" alt="describe the image" loading="lazy" width=100% height=100% />
    Change the id, set the src to 'index_html_files/<master-image>.<ext>, describe the image in alt.

    The image <a nice image filename> is the name of my file. No changes to the image id correct? Alt is my description of pic.

    This is a fascinating solution.

    Thanks
    W
    Bill Wood
    Charity Web Design
    XARA Pro+. WD17, Designer 17. Premium packages.

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

    Default Re: The challenge of mobile images - discussion

    Quote Originally Posted by bwood View Post
    Acorn … clarification on your chunk of code ….

    Here comes the sleight of hand.
    For each resized and placed image in your design, open its Placeholder Body and insert:
    <img id="unique image identifier" src="<source path>/<A nice image filename>.jpg" alt="describe the image" loading="lazy" width=100% height=100% />
    Change the id, set the src to 'index_html_files/<master-image>.<ext>, describe the image in alt.

    The image <a nice image filename> is the name of my file. No changes to the image id correct? Alt is my description of pic.

    This is a fascinating solution.

    Thanks
    W
    Bill, say you have a design file, A.xar.
    When you publish, you render as .html so you publish your resources to index_html_files. Else we are looking at an index_htm_files folder.
    Your image is B.png and you have used the Placeholder > Replace with graphic file option.
    When you save your design, B.png is copied into an A_xar_files folder.
    When you render, B.png is included in the index_html_files folder.

    The <img> Tag should be made with an id value that is solely associated with A.png; the alt text can have a duplicate elsewhere.
    The src is then just the render path and filename: index_html_files/A.png.
    A and B can be any legal strings for a filename.
    png could be jpg, webp, gif or any format a modern browser can handle even is Xara cannot.

    Acorn
    Last edited by Acorn; 06 March 2024 at 09:01 PM.
    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

  7. #7
    Join Date
    Dec 2006
    Location
    Melfort, Saskatchewan Canada
    Posts
    1,018

    Default Re: The challenge of mobile images - discussion

    Got it. Very cool. Its a great tool. I'm messing with it. I'm making the hero image first -- THEN creating a thumbnail. The placeholder alone will stretch and deform the original image. Then draw a rectangular shape and replace with the thumb. Image quality is retained.
    Bill Wood
    Charity Web Design
    XARA Pro+. WD17, Designer 17. Premium packages.

 

 

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
  •