img tag does not currently support different source content based on the media resolution.
Media resolution is relative, as people zoom in on mobile phones all the time.
For stuff like photos, just supply a larger resolution JPEG that has lower quality. This will look great when smaller and when zoomed in, while keeping the file size in a range that is ok for mobile.
This is an interesting approach I hadn't heard or tried previously. Do you have any guidelines as to image quality and resizing?