ion-img
Img is a tag that will lazily load an image whenever the tag is in the viewport. This is extremely useful when generating a large list as images are only loaded when they're visible. The component uses Intersection Observer internally, which is supported in most modern browsers, but falls back to a setTimeout when it is not supported.
Basic Usage
Properties
alt
| Description | この属性は、画像を説明する代替テキストを定義します。画像の URL が間違っている場合、画像がサポートされている形式の一つでない場合、または画像がまだダウンロードされていない場合、ユーザにはこのテキストが表示されます。 | 
| Attribute | alt | 
| Type | string | undefined | 
| Default | undefined | 
src
| Description | 画像のURL。この属性は <img>要素では必須です。 | 
| Attribute | src | 
| Type | string | undefined | 
| Default | undefined | 
Events
| Name | Description | 
|---|---|
| ionError | imgの読み込みに失敗したときに発行されます。 | 
| ionImgDidLoad | 画像の読み込みが終了したときに発行されます。 | 
| ionImgWillLoad | img srcが設定されたときに発行されます。 | 
Methods
No public methods available for this component.
CSS Shadow Parts
| Name | Description | 
|---|---|
| image | 内側の img要素。 | 
CSS Custom Properties
No CSS custom properties available for this component.
Slots
No slots available for this component.