We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d50be7 commit 39f8b4dCopy full SHA for 39f8b4d
js/load-image-scale.js
@@ -235,8 +235,12 @@
235
pixelRatio = options.pixelRatio
236
if (
237
pixelRatio > 1 &&
238
- // Check if image has not yet device pixel ratio applied:
239
- parseFloat(img.style.width, 10) !== width / pixelRatio
+ // Check if the image has not yet had the device pixel ratio applied:
+ !(
240
+ img.style.width &&
241
+ Math.floor(parseFloat(img.style.width, 10)) ===
242
+ Math.floor(width / pixelRatio)
243
+ )
244
) {
245
destWidth *= pixelRatio
246
destHeight *= pixelRatio
0 commit comments