1. A computer-implemented method comprising: organizing, with a processor, each image into different layers, with each layer having image components of a certain type; determining an optimization for display on a particular type of device, from among a plurality of different types of devices, on a per-layer basis, by performing one or more image enhancements on each layer of the image, and performing viewport preprocessing on each layer of the image to compensate for viewport and color constraints of the device requesting the image; based on the type of device requesting the image, iteratively rendering each layer of the image based on the optimization determined for the type of device to dynamically generate a rendered image that is optimized for display at the, wherein each layer is iteratively rendered until an appropriate image based on the optimization determined for the type of device is found; and converting a file format of the rendered image to a file format suitable for the device.