Check out example codes for "html if no image then text". It will help you in understanding the concepts better.

Code Example 1

<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="">

Code Example 2

<img id="currentPhoto" src="SomeImage.jpg" onerror="this.onerror=null; this.src='Default.jpg'" alt="" width="100" height="120">

Learn ReactJs, React Native from akashmittal.com