handle data uris for images