From 0767e62112792066a7e87ad37dc5de894f073098 Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Wed, 6 Mar 2024 17:28:45 -0700 Subject: [PATCH] Fix `ImageLoader` not being initialized with `webp` or `pnm` features (#12355) # Objective Fixes #12353 When only `webp` was selected, `ImageLoader` would not be initialized. That is, users using `default-features = false` would need to add `png` or `bmp` or something in addition to `webp` in order to use `webp`. This was also the case for `pnm`. ## Solution Add `webp` and `pnm` to the list of features that trigger the initialization of `ImageLoader`. --- crates/bevy_render/src/texture/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/bevy_render/src/texture/mod.rs b/crates/bevy_render/src/texture/mod.rs index 866cbc928c68e..986ae7d104ea4 100644 --- a/crates/bevy_render/src/texture/mod.rs +++ b/crates/bevy_render/src/texture/mod.rs @@ -118,6 +118,8 @@ impl Plugin for ImagePlugin { feature = "bmp", feature = "basis-universal", feature = "ktx2", + feature = "webp", + feature = "pnm" ))] app.preregister_asset_loader::(IMG_FILE_EXTENSIONS); } @@ -131,6 +133,8 @@ impl Plugin for ImagePlugin { feature = "bmp", feature = "basis-universal", feature = "ktx2", + feature = "webp", + feature = "pnm" ))] { app.init_asset_loader::();