Keep imagetype and mimetype in sync

static method being called non-static