Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MaartenVissers 32 posts 150 karma points
    Jan 05, 2022 @ 09:08
    MaartenVissers
    0

    Mobile images

    Is it possible to automatically load smaller images on the mobile version? Since the large images are not needed on a small screen....

  • Owain Jones 65 posts 437 karma points MVP 4x c-trib
    Jan 05, 2022 @ 11:01
    Owain Jones
    100

    Yup that's possible! You could use a combination of the image cropper and HTML image srcset and sizes attributes to achieve that.

    The image cropper will be used to generate the different sizes needed, and then the source sets will allow you to define multiple sources for a single image element so that the browser only loads the one it needs.

    Here's a guide on the Umbraco Image Cropper:

    And here are some guides on html image source sets:

    Note: the srcset and sizes attributes don't work on IE, but you can use a standard src as a fallback.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies