mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
Correct usage of getImage
function (#6068)
This commit is contained in:
parent
e88e799615
commit
474ecc7be6
1 changed files with 4 additions and 1 deletions
|
@ -422,7 +422,10 @@ This can be helpful if you need to add preload links to a page's `<head>`.
|
||||||
---
|
---
|
||||||
import { getImage } from '@astrojs/image';
|
import { getImage } from '@astrojs/image';
|
||||||
|
|
||||||
const { src } = await getImage({src: '../assets/hero.png'});
|
const { src } = await getImage({
|
||||||
|
src: import('../assets/hero.png'),
|
||||||
|
alt: "My hero image"
|
||||||
|
});
|
||||||
---
|
---
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
Loading…
Add table
Reference in a new issue