Copied to clipboard

Flag this post as spam?

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


  • Jukka-Pekka Keisala 90 posts 226 karma points
    Feb 08, 2022 @ 12:41
    Jukka-Pekka Keisala
    0

    Is it possible to have different image per device (mobile, tablet, desktop)?

    I can see in Image Cropper I can crop source image but I cannot upload different image to the crop. What is the best "Umbraco way" to organize media so I can generate in frontend something like

    <img src="" data-mobile="/media/image-mobile.jpg" data-tablet="/media/image-tablet.jpg" ...?
    
  • Alex Skennerton 17 posts 179 karma points notactivated
    Feb 08, 2022 @ 13:49
    Alex Skennerton
    0

    Have you looked at using <picture> and <source>? More details can be found on the W3School website

    <picture>
      <source media="(min-width:650px)" srcset="img_pink_flowers.jpg">
      <source media="(min-width:465px)" srcset="img_white_flower.jpg">
      <img src="img_orange_flowers.jpg" alt="Flowers" style="width:auto;">
    </picture>
    
  • Jukka-Pekka Keisala 90 posts 226 karma points
    Feb 08, 2022 @ 13:57
    Jukka-Pekka Keisala
    0

    Actually, my question is not HTML related but Umbraco content architecture related. Basically can i store multiple different images to one entry in Media library something like Image Cropper?

Please Sign in or register to post replies

Write your reply to:

Draft