title: HTML email hide broken image icon
body: <p>In most of my emails, the image included may not be present. In such cases the broken image icon is displayed along with my <code>alt</code> text.</p>
  
  <p><strong>Problem Explanation:</strong>
  While sending an HTML email along with an <code>&lt;img&gt;</code> tag, at cases this image <strong>may not be there (404)</strong>. As the image URL is dynamic, I cannot verify the existence of the image before sending the email. So it displays a <strong>broken image icon</strong>. I want to get rid of this icon.</p>
  
  <p><a href="https://jsfiddle.net/saravanan9006/4cqkwybs/" rel="nofollow noreferrer">JSFiddle</a></p>
  
  <p>Code Snippet:</p>
  
  <pre><code>&lt;img alt="NA" src="http://www.somerandomdomain.com/error.png" width="120"  &gt;
  </code></pre>
  
  <p>I am need of a solution compatible with all major email clients.</p>
  
  <ul>
  <li>Have tried <code>onerror</code> handler, but it does not work in email clients.</li>
  <li>Also have tried <code>text-indent: -9999px;</code>, it works in Outlook but not
  in Gmail.</li>
  <li>When the negative indent is changed to positive Outlook
  scrolls to the right which is a mess.</li>
  </ul>
  
  <p>The solutions mentioned in <a href="https://stackoverflow.com/questions/22051573/how-to-hide-image-broken-icon-using-only-css-html-without-js">possible duplicate</a>, are for the web. But my question is clearly about the <strong>HTML emails</strong>, where JS and objects does not work like the solutions provided.</p>