- Paste this into your browser console.
- Start resizing the window.
- Any images that are ever displayed in a blurry fashion will throw an error and get faded out to 0.05 opacity.
Identify images that are displayed wider than their natural width (which results in them looking blurry)
window.addEventListener('resize', () => { | |
Array.from(document.querySelectorAll('img')).forEach(img => { | |
if ((img.clientWidth * window.devicePixelRatio) > img.naturalWidth) { | |
console.error(img); | |
img.style.opacity = '0.05'; | |
} else { | |
img.style.opacity = '1'; | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment