From af9ff5aa9048dbdc446c13275c9ba8e80ea26af1 Mon Sep 17 00:00:00 2001 From: Ryan Bluth Date: Tue, 17 Dec 2024 21:25:33 -0500 Subject: [PATCH] Make image extension lowercase before checking if it is supported --- crates/egui_extras/src/loaders/image_loader.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/egui_extras/src/loaders/image_loader.rs b/crates/egui_extras/src/loaders/image_loader.rs index 4c1a846e26b..171e56170db 100644 --- a/crates/egui_extras/src/loaders/image_loader.rs +++ b/crates/egui_extras/src/loaders/image_loader.rs @@ -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; };