I have been using the following code on my webpage for several years, but it has recently stopped working in Firefox (haven't checked other browsers):
<img src="video.MP4" onerror="this.src='vid.png';"/>
Whenever the src was a video instead of an image the onerror was triggered which displayed a standardized video image in place of the video. Most items were images and still loaded correctly, I just wanted videos to display an image instead.
Now, the browser hangs with the loading icon spinning. The network tab says loading complete, but this element does not load at all, either a placeholder or the video. Possibly it is still trying to download the video and the network tab is incorrect.
Is there any way to fallback on all non-image (particularly video) files to a default image? Thanks.