Skip to content

Commit

Permalink
Make image extension lowercase before checking if it is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanBluth committed Dec 28, 2024
1 parent c37125f commit af9ff5a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/egui_extras/src/loaders/image_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ impl ImageCrateLoader {
}

fn is_supported_uri(uri: &str) -> bool {
let Some(ext) = Path::new(uri).extension().and_then(|ext| ext.to_str()) else {
let Some(ext) = Path::new(uri)
.extension()
.and_then(|ext| ext.to_str().map(|ext| ext.to_lowercase()))
else {
// `true` because if there's no extension, assume that we support it
return true;
};
Expand Down

0 comments on commit af9ff5a

Please sign in to comment.