Earlier import snippet for @astrojs/image (#4484)

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
This commit is contained in:
Tc001 2022-08-26 00:39:22 +02:00 committed by GitHub
parent 7960fb80a1
commit ca24a60b13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,6 +82,12 @@ Or, alternatively if your project is using the types through a `tsconfig.json`
## Usage
```astro title="src/pages/index.astro"
---
import { Image, Picture } from '@astrojs/image/components';
---
```
The included `sharp` transformer supports resizing images and encoding them to different image formats. Third-party image services will be able to add support for custom transformations as well (ex: `blur`, `filter`, `rotate`, etc).
### `<Image />`