Using the user agents capabilities for loading images on web
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
**Is your feature request related to a problem? Please describe.**
There is no need for a full-on image parsing library on wasm builds, as the user agent integrates plenty of image parser. It's also possible to directly initialize images from such sources. Either through HTMLImageElement or ImageData.
This would improve the loading times, by removing the image parser running in wasm, and the delivery time of the wasm file itself, as the image crate itself is quite heavy.
**Describe the solution you'd like**
Switching over to using `HTMLImageElement`.
**Describe alternatives you've considered**
**Additional context**
Depends on https://github.com/gfx-rs/wgpu/pull/5668
Contributor guide
Research direction
Start by reviewing the wasm image-loading path and the dependency in wgpu PR #5668; the issue names no file or test. Compare the current wasm image parser with HTMLImageElement or ImageData, and consider the work done when web builds load images through the user agent without bundling the image parser.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, rust, wasm
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100