added mimetype to getimage.