ionic-framework: bug: ion-img: alt text shown for brief period before src is set on inner img
Feature Request
Ionic version:
[x] 5.x
Describe the Feature Request
Currently, the alt attribute of ion-img will be displayed when the image is loading. But I think the alt attribute of ion-img should only be displayed when the image fails to load, just like the native img tag.
Describe Preferred Solution
Describe Alternatives
When loading an image, ion-img should show the loading state(spinner) instead of displaying the content of the alt attribute
Related Code
Additional Context
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 17 (5 by maintainers)
+1 problem is still here
Thanks for the clarification @colabottles! I checked this with the native
<img>element, and the alt text is shown if the image source is set asynchronously: https://codepen.io/liamdebeasi/pen/MWzXrVMion-imguses an<img>internally, so this does not appear to be a bug in Ionic. I am going to close this, but let me know if there are any questions.