Installation
Usage
Add the component to your email template. Include styles where needed.Props
TheImg component accepts all standard HTML image element attributes.
The path to the image. Can be a relative path or absolute URL
Alternate description for the image. Important for accessibility and when images are blocked
The width of the image in pixels
The height of the image in pixels
Inline styles for the image. Default styles ensure consistent rendering across email clients
Default Styles
TheImg component includes these default styles for email compatibility:
display: block- Prevents extra spacing below imagesoutline: none- Removes outlineborder: none- Removes bordertextDecoration: none- Removes text decoration
Example with Responsive Width
TypeScript
Email Client Support
This component was tested using the most popular email clients.| Gmail | Apple Mail | Outlook | Yahoo! Mail | HEY | Superhuman |
|---|---|---|---|---|---|
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |