Is there any way to use onerror() attribute in <amp-img>

Viewed 1194

Is there any way to use onerror attribute in <amp-img> ?

It was working good in html.

<img src="../images/some-logo1.jpg" onerror="this.src='../images/no-img.jpg';" class="posting-logo-img">

But amp html will create img tag inside amp-img

<amp-img src="/img/amp.jpg" alt="AMP" class="posting-logo-img" onerror="this.src='../images/no-img.jpg';" >
  <noscript>
    <img src="/img/amp.jpg" alt="AMP"> 
  </noscript>
</amp-img>
1 Answers
Related