js img not available code example
Example 1: alternative image in img tag
<img src="https://imageurl.com" alt="Image not found" onerror="this.src='https://alternativeimageurl.com'" />
Example 2: bootstrap show alternative image if not exist
<img id="currentPhoto" src="https://www.ccrharrow.org/Images/content/953/741209.pg" onerror="this.src='https://www.unesale.com/ProductImages/Large/notfound.png'" alt="">