89d76753a0
* moving all normalization logic out of the Image component
* refactor: only require loaders to provide the image src
* Adding a `<Picture />` component
* fixing types.ts imports
* refactor: moving getImage to it's own file
* updating component types to use astroHTML.JSX
* Revert "updating component types to use astroHTML.JSX"
This reverts commit 6e5f578da8
.
* going back to letting loaders add extra HTML attributes
* Always use lazy loading and async decoding
* Cleaning up the Picture component
* Adding test coverage for <Picture>
* updating the README
* using JSX types for the Image and Picture elements
* chore: adding changeset
* Update packages/integrations/image/src/get-image.ts
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* allow users to override loading and async on the <img>
* renaming config to constants, exporting getPicture()
* found the right syntax to import astro-jsx
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
17 lines
484 B
Text
17 lines
484 B
Text
---
|
|
import socialJpg from '../assets/social.jpg';
|
|
import { Image } from '@astrojs/image';
|
|
---
|
|
|
|
<html>
|
|
<head>
|
|
<!-- Head Stuff -->
|
|
</head>
|
|
<body>
|
|
<Image id="social-jpg" src={socialJpg} width={506} height={253} />
|
|
<br />
|
|
<Image id="google" src="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" width={544} height={184} format="webp" />
|
|
<br />
|
|
<Image id='inline' src={import('../assets/social.jpg')} width={506} />
|
|
</body>
|
|
</html>
|