Embedded images

I would love to be able to embed images (jpeg, gif) into documents. Ideally they would be visible as inline images but I would also be happy if they only showed up in print.

3 Likes

Assuming that you are thinking about Markdown and transforming it, it might be worth having a read of these topics.

thanks for the links, hadn’t seen these.

However, I am looking for support for images without public URL (local images) and also ability to simply copy/paste an image.

2 Likes

As a purely text based and plain text focused application, I think that rich text and support for directly embedding images is probably out of scope for the feature set of the app as it stands.

Day One used to be brilliant. It allowed for markdown + inline images. I really loved that workflow. They moved everything to rich text and I don’t want that. I just want Markdown with inline image support. I would love to see this added into Drafts.

3 Likes

I definitely would love to have this feature as well. I realize this means @agiletortoise would need to probably store the images within the Drafts DB as well as implement some sort of custom URL logic so that the images could be rendered on screen. Personally, I’d love that since I want to treat drafts as not only my notes system but also my all-purpose reference system and being able to store/link to all sorts of files would be great.

For the time being, I’ve created a hack iOS Shortcut which will generate a macOS URL as well as a iOS File Bookmark URL (thanks to Toolbox Pro) so that I can at least reference the file. It’s not very shareable, but it does work for now. I’d still love to be able to render images though in Preview.

1 Like

You can if they are publicly hosted images. If you want to do it with locally stored files and without running a parallel web server (which you can do on Mac and iPad), you could use this approach.

1 Like

Thanks @sylumer. I know of the Base 64 option (though the link you provided looks to be incredibly clever) and yes, for publicly hosted files, of course it’s supported. What I’m looking for though, is the option to reference locally stored files. They don’t need to be locally stored inside the Files app, I’m happy for them to be saved to a Drafts accessible space, I just want to be able to do something like:

![some alt text](link to local file) and then have Drafts render it in the preview. If you create a .md file on your Mac, this will work, and as far as I can tell, this doesn’t need any web server, so long as you’re using relative paths to the file from where your .md file is located.

Well, that is what the preview does. You just need to use the shortcut or quick action to generate the base64 versions of the image files to prime it. I keep my original image files in place and generate the base64 versions alongside, regenerating them if I need to.

Unfortunately, Drafts has no way to read in the image files for converting to base64 on the fly, which had been my original intention. Hence the intermediate priming step.

1 Like

Hence the feature request. What you’re proposing does work, but yeah, I’m looking for a more built-in solution. Thanks for sharing though. I’ll try it out as a work-around.

1 Like

Ulysses implementation would be enough.
It is also fully markdown app, but can preview images as well.

Maybe not embedded images, but just like another kind of drafts db item. “Image-draft”.

I would like to use Drafts like “Inbox for everything”, and I can do it for now, or like plain text, or link. But I don’t have ability to store images and screenshots.

Drafts does now have native support for referencing local resources for previews.

Details here: