replace mime_type with path