I'm not sure this will be correct if the `img` element has been zoomed in/out since won't this report the size of the DOM element, not the underlying image?