Skip to main content

IMAGE_EXTENSIONS

Constant IMAGE_EXTENSIONS 

Source
pub const IMAGE_EXTENSIONS: &[&str];
Expand description

Extensions image-mode claims.

The same set org’s inline-image scanner allows, and deliberately so: a file that draws inline must draw when opened directly, or the two surfaces disagree about what an image is. An allow-list rather than sniffing — a file is opened because the user asked for it, and guessing at its type by reading it is how a text file with a stray byte becomes a broken picture.