johannschopplich/unlazy

Fixed size, varying density

Closed this issue · 3 comments

Describe the feature

as fixed-size-varying-density said, this feature provides,

  • base on the biggest DPI image, e.g. 3x/image.png
  • auto generate lower DPI image, e.g. 2x/image.png, 1x/image.png
  • auto caculate the fixed width/height of image in 1x/image.png. e.g. width1x
  • finally something like <img src="~assets/1x/image.png" srcset="~assets/2x/image.png 2x, ~assets/3x/image.png 3x" :width="width1x"

Additional information

  • Would you be willing to help implement this feature?
  • Can you think of other implementations of this feature?

Final checks

Hi there!
Is this a feature request? Is this a bug report? Please elaborate.
PR welcome!

Hi there! Is this a feature request? Is this a bug report? Please elaborate. PR welcome!

feature request. I'm currently investigating this feature, I don't have a complete idea or solution yet, the current implementations of responsive images that I've searched for, are Varying size and density, so I'm not sure that on mobile, on HiDPI screens, I'm on the right track, and the community is so active, why am I the one who has a need for this?

As this is a native image feature, it is supported:

<img data-src="~assets/1x/image.png" data-srcset="~assets/2x/image.png 2x, ~assets/3x/image.png 3x">