Ion-img error event

Is there an event on ion-img to determine if the image has NOT loaded successfully? I know there are classes but I need to call code for this case.

We can do the following with a standard image tag:
<img (error)=“imageError()” …

Is there an equivalent with the ion-img tag?

1 Like

Did you founded? I am searching about this without success

Are you absolutely certain you want to be using ion-img in the first place?

Is necessary to use with in Virtual Scroll, no?

Yes, but I have seen countless examples of people trying to use it outside of that context.

The only thing I can think to try is a bit akin to using a nuclear warhead to kill a fly, and that would be attaching an event listener to the error event at document level, with useCapture set to true. Either that or forking the Ionic source and adding error handling to the <img> element embedded in <ion-img> and exposing that as an Output() property.