EFFECT_MEDIA
The image or video of a media effect has no usable pixels, so the instance failed until the source changes.
On this page
EFFECT_MEDIA: cannot decode {src}Why it happens
- The image did not load: a 404, a wrong path or a network error. The effect waits for the element’s
loadorerrorevent and then decodes, so a failed request ends as a failed decode. - The file is broken, or the browser does not support its format.
- The image has
crossoriginset but the server sends no CORS headers. The browser then refuses the image itself, and the failure shows here instead of asEFFECT_CORS. - A
videofiredloadeddatawithout data for the current frame. The message then readsvideo has no data.
A source change during decode is not a failure. When currentSrc changes while the effect decodes, for example on a srcset switch at resize or when a lazy-loading library swaps the source, the effect starts over with the new one.
How to fix
Open the URL from the message in the browser or the network panel and fix the path or the file.
The failure is not final. The instance listens to its element, and the next load (loadeddata for video) with a different currentSrc, or a change of the crossorigin attribute, puts it back to waiting. A corrected source retries without a reload:
const img = document.querySelector<HTMLImageElement>('img[data-dio]')if (img) img.src = '/img/cover.avif'