Back to React Email

Readme

packages/img/readme.md

0.0.153.1 KB
Original Source

<div align="center"><strong>@react-email/img</strong></div> <div align="center">Display an image in your email.</div> <div align="center"> <a href="https://react.email">Website</a> <span> · </span> <a href="https://github.com/resend/react-email">GitHub</a> </div>

Install

Install component from your command line.

With yarn

sh
yarn add @react-email/img -E

With npm

sh
npm install @react-email/img -E

Getting started

Add the component to your email template. Include styles where needed.

jsx
import { Img } from "@react-email/img";

const Email = () => {
  return ;
};

Props

NameTypeDefaultDescription
altstringAlternate description for an image
srcstringThe path to the image
widthstringThe width of an image in pixels
heightstringThe height of an image in pixels

Support

This component was tested using the most popular email clients.

Gmail ✔Apple Mail ✔Outlook ✔Yahoo! Mail ✔HEY ✔Superhuman ✔

License

MIT License