JSFiddle - React, Tailwind, and code Playground

HTML

<img id="imgUrl" src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/yd/r/Cou7n-nqK52.gif'added'" alt="image" />
<!--check 'added' in the end of src, remove it-->

JavaScript

jQuery(document).ready(function () {
    jQuery("#imgUrl").error(function () {
        jQuery(this).hide();
});
 });