Detecting an image 404 in Javascript March 12, 2023 by Tarik Handle the <img> element’s onerror event.