cloudinary icon indicating copy to clipboard operation
cloudinary copied to clipboard

srcset support?

Open asencis opened this issue 3 years ago • 1 comments

I have a quick question before I look to utilize this package.....I usually have a srcset with different image types such as the following:

      <picture class="h-full w-full object-cover">
        <source
          media="(max-width:650px)"
          v-bind:srcset="require('@/assets/images/lucas-benjamin-wQLAGv4_OYs-unsplash.optimised.mobile.webp')"
          type="image/webp"
        >
        <source
          media="(max-width:650px)"
          v-bind:srcset="require('@/assets/images/lucas-benjamin-wQLAGv4_OYs-unsplash.optimised.mobile.jpg')"
          type="image/jpg"
        >
        <source
          v-bind:srcset="require('@/assets/images/lucas-benjamin-wQLAGv4_OYs-unsplash.optimised.webp')"
          type="image/webp"
        >
        <source
          v-bind:srcset="require('@/assets/images/lucas-benjamin-wQLAGv4_OYs-unsplash.optimised.jpg')"
          type="image/jpg"
        >
        <img
          v-bind:src="require('@/assets/images/lucas-benjamin-wQLAGv4_OYs-unsplash.jpg')"
          alt="asencis | Enriching research data for everyone."
          class="h-full w-full object-cover"
        >
      </picture>

Are there any documented examples of replicating this with cloudinary? Or is it more of a manual integration...so we build a srcset Array ourselves from multiple cloundinary calls?

asencis avatar Jan 20 '21 10:01 asencis

@asencis at the moment we don't have a fixed standards for support srcset in image component (especially for picture). I would say it's a manual integration for now, you should use $cloudinary.image.url() to create your srcset array unfortunately.

However, I started implementing a feature for srcset, at least for img component. Hopefully we will have a ready one soon :)

mayashavin avatar Jan 20 '21 13:01 mayashavin

Hey, I am closing this issue as it is targeting the v1 version and it is really old (more than one year stale)

Baroshem avatar Jun 02 '23 11:06 Baroshem