Fixes image files being assigned wrong media types when format can't be detected from metadata — preventing silent failures in downstream tools.