This bug is to track the initial draft of adding image-resolution. I expect it to be broken into a series of smaller patches.
Created attachment 139586 [details] Draft patch
The attached draft patch demonstrates which components of the CSS stack are relevant to this feature. It does not implement extracting resolution data from images or the 'snap' keyword. Given that my primary goal was to enumerate the affected components, I expect some bugs. This feature should be testable using javascript tests, ie no pixel tests required. TODO: add an enum for image-resolution flags (snap/from-image) and implement snap.
The code has changed significantly since this patch was created. We probably can't use it in its current form.