Now that bug 854795 has landed we can add a media fragment to the url to save memory. But to do that, we need the size of the image, so may have to call parseJPEGMetadata again.  Not something to do in this patch.  Just something I want you to be aware of.