JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2481348
  • Score
    100M100P100Q200648F
  • License MIT

Display an image in your email

Package Exports

  • @react-email/img
  • @react-email/img/dist/index.js
  • @react-email/img/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@react-email/img) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React Email img cover

@react-email/img
Display an image in your email.

Install

Install component from your command line.

With yarn

yarn add @react-email/img -E

With npm

npm install @react-email/img -E

Getting started

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

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

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

Props

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

Support

This component was tested using the most popular email clients.

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

License

MIT License