Add support for a "max-width" attribute that will resize the image before it is stored in memory.