0
votes

i'm trying to show a image that has better resoultion, and not so heavy size img on my mobile web view site, by using the srcset.

Here is the problem. My current page gets img_260 which is 260x260 size. But my tag has to be 140 ~ 180 width size [ could be 140 or 180 depends on my mobile device type]

So, if my device type only represent 1dpr, i was thinking it should show img180 because its 180 width size. And if my device type represent 2dpr, i was thinking it should get 360w, because 360 size img would become 180 size in 2dpr. But in my mobile web view it keep getting always the 360 size img.

Please need some help.

  <div>
       <picture>
           <source srcset="img180 180w, img260 260w, img360 360w">
       </picture>
    </div>
1
Better resolution means higher memory usage (as long as you use the same format).vonbrand

1 Answers

0
votes

Yeah,I got it. Actually you shouls use three srcset tags for three images but u are using only one.Take a look at https://www.w3schools.com/tags/tag_picture.asp .It helps you.