Some additional optimizations to images.