Install

Install component from your command line.

npm install @react-email/components -E

# or get the individual package

npm install @react-email/img -E

Getting started

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

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

const Email = () => {
  return <Img src="cat.jpg" alt="Cat" width="300" height="300" />;
};

All email clients can display .png, .gif, and .jpg images. Unfortunately, .svg images are not well supported, regardless of how they’re referenced, so avoid using these. See Can I Email for more information.

Props

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

Support

All components were tested using the most popular email clients.

Gmail

Gmail

Apple Mail

Apple Mail

Outlook

Outlook

Yahoo! Mail

Yahoo! Mail

HEY

HEY

Superhuman

Superhuman