<img srcset="image 195w" sizes="50vw" onload="w(this.width)">
The img-environment-changes algorithm reruns when the user resizes the window, and the last step will fire a load event. It seems Gecko and Blink don't fire load on resize, but I think at least Blink did previously. @yoavweiss do you know if this changed in Blink?
I suggest we fire a resize event instead if it picks the same resource but the pixel density has changed, and only fire load if a different resource was loaded. Though maybe we don't need a resize event either? Maybe updating the pixel density should be done differently, like storing the sizes on the "image request" and have it update independently from img-environment-changes? (Right now per spec I think an image would "freeze" its size if img-environment-changes algorithm starts to load a new image, until the new image is loaded, which also seems sub-optimal.)