With the iPhone 4, supporting images on mobile devices got more complicated. This is because of Apple's "Retina Display", which has approximately 4x as many pixels in a given space as previous displays (326dpi). One can still use standard-resolution images, but they come across as looking blurry or chunky for users accustomed to the sharper images the display can provide.
Since then, several other mobile vendors have also introduced devices with high-density displays.
In Texas State's implementation, we had an image-sizing utility written in Perl that would accept the desired dimensions for an image as URL parameters. Thus, we had a method that would wait for a dom:loaded event (which fires after the DOM is built, but before images are loaded), and would rewrite the SRC attribute of any images with a txst-multiresolution-image class to request a higher resolution based on the current devicePixelRatio:
See http://www.theatreanddance.txstate.edu/ for an example of our image gallery in action. (It also uses swiping gestures to scroll through images, though I was never quite happy with how smooth we were able to make them.)
Because the Magnolia imaging library relies on predefined image variations, we can't use this exact approach, which relies on being able to specify arbitrary dimensions for an image as part of the request. It should be possible to adapt to a range of variations without too much trouble though.