I'm in the process of implementing responsive and adaptive images based on device width.
Here is the original image:
<img src="https://cdn.statically.io/img/www.forexadmin.com/wp-content/uploads/2019/11/Exness-Affiliate.png"/>
Using Srcset:
<img
src="https://cdn.statically.io/img/www.forexadmin.com/wp-content/uploads/2019/11/Exness-Affiliate.png"
srcset="
https://cdn.statically.io/img/www.forexadmin.com/wp-content/uploads/2019/11/Exness-Affiliate.png?w=400 400w,
https://cdn.statically.io/img/www.forexadmin.com/wp-content/uploads/2019/11/Exness-Affiliate.png?w=800 800w,
https://cdn.statically.io/img/www.forexadmin.com/wp-content/uploads/2019/11/Exness-Affiliate.png?w=1400 1400w,
https://cdn.statically.io/img/www.forexadmin.com/wp-content/uploads/2019/11/Exness-Affiliate.png?w=2000 2000w,
https://cdn.statically.io/img/www.forexadmin.com/wp-content/uploads/2019/11/Exness-Affiliate.png?w=3800 3800w
"
/>
I am encountering two issues:
1) The 2000px wide image loads even on smaller devices, like iPhone 6s (it should load the 800px image).
2) I have included both images (with and without srcset). Both load with the same dimensions. However, the one with srcset appears smaller compared to the other. Without specifying a width in the html/css, shouldn't it render at the actual image width? Here is the fiddle for reference: https://jsfiddle.net/hfcbatdn/