summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Happydev <81974850+MoustaphaDev@users.noreply.github.com> 2023-01-31 17:50:17 +0100
committerGravatar GitHub <noreply@github.com> 2023-01-31 16:50:17 +0000
commit474ecc7be625a0ff2e9bc145af948e75826de025 (patch)
tree54d70e82f6b2dcdad85ad334cbc6d7eb654be245
parente88e799615844dda43219110376bac91793091bf (diff)
downloadastro-474ecc7be625a0ff2e9bc145af948e75826de025.tar.gz
astro-474ecc7be625a0ff2e9bc145af948e75826de025.tar.zst
astro-474ecc7be625a0ff2e9bc145af948e75826de025.zip
Correct usage of `getImage` function (#6068)
-rw-r--r--packages/integrations/image/README.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/integrations/image/README.md b/packages/integrations/image/README.md
index 213d9d3bb..e33520239 100644
--- a/packages/integrations/image/README.md
+++ b/packages/integrations/image/README.md
@@ -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>