Skip to content

Web Assets fail to load without file extension, even with valid content-type #22274

@logankaser

Description

@logankaser

Bevy version and features

Using v0.18.0-rc.1 to get the platform-verifier support since I'm connecting to a server with an internal TLS cert.
Relevant features:

  "http",
  "https",
  "dds",
ureq = { version = "3", features = ["gzip", "rustls", "platform-verifier"] }

What you did

Try to load a DDS texture asset with:
asset_server.load(&url);
From a URL that ends in tile coordinates like 011291-083169 with no extension.
From the code it's clear web assets don't consider the content-type, and so the loader panics with:

thread 'IO Task Pool (1)' (13506774) panicked at /Users/lkaser/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_image-0.18.0-rc.1/src/image_loader.rs:188:22:
called `Option::unwrap()` on a `None` value
2025-12-26T04:49:48.157410Z ERROR bevy_asset::server: Failed to load asset 'http://server.url:3000/api/tiles/011297-083172', asset loader 'bevy_image::image_loader::ImageLoader' panicked

note: server.url is not the real url of course.
Even though the server is responding with a correct content-type:

HTTP/1.1 200 OK
content-type: image/vnd-ms.dds
content-encoding: gzip
content-length: 230516
...

I've also validated the integrity of the textures; they load in other applications.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsC-BugAn unexpected or incorrect behaviorS-Needs-DesignThis issue requires design work to think about how it would best be accomplished

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions