Besides the native features of img, support lazy load, custom placeholder and load failure, etc.
### Basic Usage
:::demo Indicate how the image should be resized to fit its container by `fit`, same as native [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit)。
:::demo Custom failed content when error occurs to image load by `slot = error`
```html
<divclass="demo-image__error">
<divclass="block">
<spanclass="demonstration">Default</span>
<el-image></el-image>
</div>
<divclass="block">
<spanclass="demonstration">Custom</span>
<el-image>
<divslot="error"class="image-slot">
<iclass="el-icon-picture-outline"></i>
</div>
</el-image>
</div>
</div>
```
:::
### Lazy Load
:::demo Use lazy load by `lazy = true`. Image will load until scroll into view when set. You can indicate scroll container that adds scroll listener to by `scroll-container`. If undefined, will be the nearest parent container whose overflow property is auto or scroll.
```html
<divclass="demo-image__lazy">
<el-imagev-for="url in urls":key="url":src="url"lazy></el-image>
| src | Image source, same as native | string | — | - |
| fit | Indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) | string | fill / contain / cover / none / scale-down | - |
| scroll-container | The container to add scroll listener when using lazy load | string / HTMLElement | — | The nearest parent container whose overflow property is auto or scroll |