@astrojs/image
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "@astrojs/image", | ||
"description": "Load and transform images in your Astro site.", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"type": "module", | ||
@@ -45,3 +45,3 @@ "types": "./dist/types.d.ts", | ||
"@types/sharp": "^0.30.4", | ||
"astro": "1.0.0-beta.62", | ||
"astro": "1.0.0-beta.63", | ||
"astro-scripts": "0.0.6" | ||
@@ -48,0 +48,0 @@ }, |
@@ -155,2 +155,26 @@ # @astrojs/image 📷 | ||
<details> | ||
<summary><strong>Images in markdown</strong></summary> | ||
<br/> | ||
The `<Image />` component can also be used to optimize images in markdown pages. For local images imported from your project's `src` directory, use Astro's the `setup` frontmatter to import the image file. | ||
```html | ||
--- | ||
setup: | | ||
import { Image } from '@astrojs/image/components' | ||
import hero from '../../assets/blog/introducing-astro.jpg' | ||
title: Hello world! | ||
publishDate: 12 Sep 2021 | ||
name: Nate Moore | ||
value: 128 | ||
description: Just a Hello World Post! | ||
--- | ||
<Image src={hero} width={640} /> | ||
<Image src="https://example.com/image.jpg" width={640} aspectRatio="16:9" /> | ||
``` | ||
</details> | ||
## Troubleshooting | ||
@@ -157,0 +181,0 @@ - If your installation doesn't seem to be working, make sure to restart the dev server. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51865
196