Skip to main content

image_mime_from_extension

Function image_mime_from_extension 

pub fn image_mime_from_extension(ext: &str) -> Option<&'static str>
Expand description

Map a bare file extension to the image MIME the multimodal loader assigns it. Returns Some for formats the loader recognizes, which is a wider set than it accepts — bmp resolves here so the loader can reject it by name instead of failing as an unknown format.