Correct usage of getImage
function (#6068)
This commit is contained in:
parent
81f6ece5ca
commit
6daf548688
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';
|
||||
|
||||
const { src } = await getImage({src: '../assets/hero.png'});
|
||||
const { src } = await getImage({
|
||||
src: import('../assets/hero.png'),
|
||||
alt: "My hero image"
|
||||
});
|
||||
---
|
||||
|
||||
<html>
|
||||
|
|
Loading…
Reference in a new issue