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`.
This commit is contained in:
parent
6f2ecdf822
commit
a1974a4738
@ -118,6 +118,8 @@ impl Plugin for ImagePlugin {
|
|||||||
feature = "bmp",
|
feature = "bmp",
|
||||||
feature = "basis-universal",
|
feature = "basis-universal",
|
||||||
feature = "ktx2",
|
feature = "ktx2",
|
||||||
|
feature = "webp",
|
||||||
|
feature = "pnm"
|
||||||
))]
|
))]
|
||||||
app.preregister_asset_loader::<ImageLoader>(IMG_FILE_EXTENSIONS);
|
app.preregister_asset_loader::<ImageLoader>(IMG_FILE_EXTENSIONS);
|
||||||
}
|
}
|
||||||
@ -131,6 +133,8 @@ impl Plugin for ImagePlugin {
|
|||||||
feature = "bmp",
|
feature = "bmp",
|
||||||
feature = "basis-universal",
|
feature = "basis-universal",
|
||||||
feature = "ktx2",
|
feature = "ktx2",
|
||||||
|
feature = "webp",
|
||||||
|
feature = "pnm"
|
||||||
))]
|
))]
|
||||||
{
|
{
|
||||||
app.init_asset_loader::<ImageLoader>();
|
app.init_asset_loader::<ImageLoader>();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user