Keep imagetype and mimetype in sync