Formatting images for display on the web