astro/packages/integrations/image/test/fixtures/get-image-remote/src/pages/index.astro
2022-10-07 17:08:15 -04:00

25 lines
638 B
Text

---
import { getImage } from "@astrojs/image";
const i = {
src: "https://images.unsplash.com/photo-1664309570712-564c233f112b?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=200&q=80",
format: 'avif',
width: 200,
height: 300,
}
const image = await getImage(i as any);
---
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<title>Astro</title>
</head>
<body>
<h1>Astro</h1>
<img {...image} />
</body>
</html>