Closed GorvGoyl closed 4 years ago
hey @JerryGoyal ,
We will improve this in the next release (during the week). size * window.devicePixelRatio
this thing didn't work in IE, that's why it was rounded. I fix it by rounding to one decimal place.
hey @JerryGoyal
fixed in v3.2.3
I'm using blur-hash js library for responsive images.
updateSizeWithPixelRatio()
method is not optimized when DPR is 1.5. It scales up to 2size * Math.round(window.devicePixelRatio || 1))
and serves the double size 2600px image for my 1300px screen, doubling the image bandwidth!So, I tried full-screen images with both width 2600px and 1300px and despite having dpr 1.5, I didn't notice any difference, only the large size of 2600px image. Unfortunately, there's no way to configure dpr as of now. cloudinary offers a simple solution to opt-out for auto-detect-dpr-ratio. There are many devices with fractional dpr so a better approach would be to not rounding off the dpr.
size * window.devicePixelRatio
.