Add content-types to image elements
Use content type from element when generating HTML