## class: `WyPreviewImage`, `wy-preview-image`

Image preview component used inside file preview overlays.

**Used sub components:**

*   [`<wy-container>`](./ui/wy-container)
*   [`<wy-progress-circular>`](./ui/wy-progress-circular)

### Fields

| Name     | Type                  | Default | Description                                      | Inherited From |
| -------- | --------------------- | ------- | ------------------------------------------------ | -------------- |
| `src`    | `string`              |         | Source URL of the image to preview.              |                |
| `width`  | `number \| undefined` |         | Intrinsic width of the preview image in pixels.  |                |
| `height` | `number \| undefined` |         | Intrinsic height of the preview image in pixels. |                |

### Events

| Name                  | Type                         | Description                            | Inherited From |
| --------------------- | ---------------------------- | -------------------------------------- | -------------- |
| `file-preview-loaded` | `FilePreviewLoadedEventType` | The file preview is considered loaded. |                |

### Attributes

| Name     | Field  | Inherited From |
| -------- | ------ | -------------- |
| `src`    | src    |                |
| `width`  | width  |                |
| `height` | height |                |

### CSS Parts

| Name                   | Description                                     |
| ---------------------- | ----------------------------------------------- |
| `wy-content-image`     | Root image wrapper.                             |
| `wy-intrinsic-image`   | Modifier when dimensions are not provided.      |
| `wy-content-image-img` | The \<img> element for the preview.             |
| `wy-content-progress`  | Progress indicator shown while the image loads. |

<hr/>

## Exports

| Kind                        | Name               | Declaration    | Module                             | Package |
| --------------------------- | ------------------ | -------------- | ---------------------------------- | ------- |
| `js`                        | `WyPreviewImage`   | WyPreviewImage | lib/components/wy-preview-image.ts |         |
| `custom-element-definition` | `wy-preview-image` | WyPreviewImage | lib/components/wy-preview-image.ts |         |
