Display an image in your email
npm install @react-email/imgInstall component from your command line.
#### With yarn
``sh`
yarn add @react-email/img -E
#### With npm
`sh`
npm install @react-email/img -E
Add the component to your email template. Include styles where needed.
`jsx
import { Img } from "@react-email/img";
const Email = () => {
return
;
};
``
| Name | Type | Default | Description |
| ------ | ------ | ------- | ---------------------------------- |
| alt | string | | Alternate description for an image |
| src | string | | The path to the image |
| width | string | | The width of an image in pixels |
| height | string | | The height of an image in pixels |
This component was tested using the most popular email clients.
| |
|
|
|
|
|
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
MIT License