bevyengine / bevyengine/bevy

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

Open
#22,274 2 comments 0 reactions 0 assignees View on GitHub
A-Assets C-Bug S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.