Replies: 3 comments 2 replies
-
I am so confused about where to place images. |
Beta Was this translation helpful? Give feedback.
-
Our intentions are to be agnostic in relation to what way the user will use for hosting their images, if they will be hosting on their Next App or if they will be hosting somewhere else is not something we can account for perfectly. |
Beta Was this translation helpful? Give feedback.
-
Has this been addressed? |
Beta Was this translation helpful? Give feedback.
-
Describe the Bug
At least one of the use cases for this project is to use React Email to build, preview and then send transactional (dynamic) emails within existing (almost certainly NextJS) projects.
Right now, accessing static (image) assets in both the React-Email preview and when sending the email via your app requires you to duplicate these assets in the repo because React-Email requires them to be in a
static
folder within the root, while NextJS - since version9.0.6
, so as far as I can tell, before even the creation of this project - requires them be within thepublic
folder (and you'd have to put your files within an unnecessarystatic
folder insidepublic
too just to match the preview).This just seems a pointless level of complication and redundancy when you could mirror the public folder into the
.react-email
public folder instead.Not only this, but it's additionally confusing to new users in general as there is no documentation about where to put your files so that they are accessible within the
.react-email
preview app and the demo in the repository incorrectly stores these files within theemails
folder (which achieves nothing in reality, and would of course still require duplicating these assets to be available in your public folder anyway even if it did).Please just simplify things by mirroring the
./public
folder into.react-email/public
, or at the very least having a configuration file that defines where your static assets are so both./static
and./public
can work as expected.Which package is affected (leave empty if unsure)
No response
Link to the code that reproduces this issue
https://github.com/resendlabs/react-email
To Reproduce
npx react-email dev
.react-email/public
Expected Behavior
npx react-email dev
./public
is mirrored into.react-email/public
What's your node version? (if relevant)
No response
Beta Was this translation helpful? Give feedback.
All reactions