Could not load image because of The source image could not be decoded Error when adding WMTS layer
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: 2.6.1
**browser**: Chrome v 97.0.4692.99
### Steps to Trigger Behavior
add WMTS layer to map as "raster" (using NOAA imagery in example)
### Link to Demonstration
https://codepen.io/sanidhya-pratap-singh/pen/JjOKpqV
### Expected Behavior
All tiles should be rendered
### Actual Behavior
All tiles are not rendered correctly. Tiles are missing altogether or showing old image from lower zoom level. Constant error in browser console
`Error: Could not load image because of The source image could not be decoded.. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`


Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodePen and reproduce the NOAA WMTS raster layer in Chrome, using the browser console to confirm the image-decoding error and the missing or stale tiles. Trace the WMTS raster tile-loading path from that configuration; done means all expected tiles render correctly without decode errors or lower-zoom fallbacks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100