Skip to main content

is_image

Function is_image 

Source
pub fn is_image(source: &str) -> bool
Expand description

Whether a URL or a path names a picture, by the only thing either says about itself without being fetched — its extension, against what gpui can decode.

What decides whether a paste or a drop is worth offering as an image. A server is free to disagree; the answer is a guess about a name, and the alternative is a menu row that paints a broken box.