Closed pidjey13 closed 6 years ago
Hey @pidjey13, sorry for the late answer. You can serve local images by using the absolute path to the image.
The preview is rendering and writing the HTML file in a temp folder so the path of the HTML file and the path of the images don't match. I don't see any "easy" way to support relative paths for images other than actually writing the file in the same folder... what do you think @iRyusa?
We could rewrite every src
to absolute path with a regexp but don't know if it will work
Or something similar to what @meriadec did in the app: https://github.com/mjmlio/mjml-app/blob/master/app/components/Iframe/index.js#L58-L64
Don't know how the app work internally but we're using a tempfile in the atom editor, I don't know if we can alter the view as @meriadec does
First of all sorry for any mistake about the language and about posting this issue, 'cause It's the first time I open an issue.
The problem is that in the live preview on Atom images in the solution (so it's not about images hosted on the internet) are not being displayed.
It's the first project I do using MJML, so I don't know if I'm the only one, but I thought to open that issue if it can be helpful somehow.