Replies: 2 comments
-
In particular, is there the equivalent of import { Img } from 'jsx-email';
const baseUrl = import.meta.isJsxEmailPreview ?
? '/assets/'
: 'https://assets.example.com/';
const Email = () => {
return <Img src={`${baseUrl}cat.jpg`} alt="Cat" width="300" height="300" />;
}; |
Beta Was this translation helpful? Give feedback.
0 replies
-
I guess what we would need is that this behavior be configurable (eg replace |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Right now from reading the doc it's not clear how the Image component handles images:
some example code like the turborepo https://github.com/resend/react-email-turborepo-pnpm-example/tree/main/packages/transactional/emails/static shows for instance a local
static
folder, but doesn't mention how those images will be made available for consumers of the emails?Background
There are multiple ways to show images in emails: embedding them as inline attachments, or linking them from a public http endpoint, but the documentation doesn't make clear whether one, the other, or both behaviors are used, and how to configure them
Proposal
Clarify how images are handled, whether everything is automated (inlining), whether we should manually upload images somewhere, and how to configure that behavior (public base URL, etc)
Beta Was this translation helpful? Give feedback.
All reactions