maciakl / MarkdownJournal

Plain text journaling with Markdown and Dropbox on the Sinatra platform.
http://markdownjournal.com
46 stars 7 forks source link

Including Images #15

Open jalandoak opened 8 years ago

jalandoak commented 8 years ago

This is less of an issue, and more of a request. I can insert Markdown for an image, and MarkdownJournal tries to display, but it can't find it. Is there a way to get them to show images loaded to Dropbox?

maciakl commented 8 years ago

This is a good idea, though I'm not entirely sure how to implement it yet.

Right now you should be able to insert public images by simply putting a full URL in the image link:

![alt text](http://example.com/foo.jpg)

Images in a Dropbox folder are not web accessible so including them with a markdown syntax won't work. So this would require some sort of a hook, that would grab the image from your folder, load it into memory, convert it into base64 and then inject it into the final page as an inline image.

I will fiddle around with it and see what can be done.