Open ionitron-bot[bot] opened 5 years ago
any update for this issue?
This is already there.
This is already there.
I have tried but fail. Please help.
<ion-img [src]="image" onerror="this.src='https://via.placeholder.com/150'"></ion-img>
<img [src]="image" onerror="this.src='https://via.placeholder.com/150'"/>
@pickfire
Can you please check the source code? IIRC it is (onerror)
or (error)
, I don't recall. (I was also the one who wrote it IIRC but I don't recall how was it called)
Hey @chenlitchian did you get this sorted? I tried both onerror
and error
and none of them worked for me. I'm on ionic 5.0.0
bump
bump
Original issue by @pickfire on 2018-09-19T08:22:41Z
Feature Request
Ionic Info
Describe the Feature Request
Add support for ion-img to handle error during lazy loading. Currently only
img
supportsonerror
bution-img
does not.onerror
is useful when we want to fallback to a default image. Such as:Describe Preferred Solution
onerror
support.Describe Alternatives
Use
img
but there is no lazy loading.Related Code
-
Additional Context
-