state property and / or statechange event
You can access to the loading state of your image or video by :
- binding to state property (current value is undefined)
- or listening to statechange event (current detail event is undefined)
Here are the values the Component will emit :
- new: when the img or video source has not started loading
- loading: when the img or video source is loading
- done: when the img or video source has successfully loaded
- error: when an error occurred while loading the img or video source
Change the width of your browser to see the image aspect-ratio adapt according to the CSS rules. The loading status should then also be updated.