We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11382ef commit 300a908Copy full SHA for 300a908
docs/components/image.md
@@ -28,6 +28,23 @@ referenced, so avoid using these. See [Can I
28
Email](https://www.caniemail.com/features/image-svg/) for more information.
29
:::
30
31
+::: tip
32
+To use local images during development, you can resolve the path with node.
33
+Just remember, for production, you'll need to host the images somewhere and
34
+reference them with a URL.
35
+
36
+```jsx
37
+import { Img } from 'jsx-email';
38
39
+const baseUrl = import.meta.DEV ? import.meta.resolve('../assets/') : 'https://assets.example.com/';
40
41
+const Email = () => {
42
+ return <Img src={`${baseUrl}cat.jpg`} alt="Cat" width="300" height="300" />;
43
+};
44
+```
45
46
+:::
47
48
## Component Props
49
50
```ts
0 commit comments