Optimized loading of image data.