Improved image formatting