GitHub Pages Integration (Specifically, attaching images with relative path references instead of default Obsidian format)

Use case or problem

I recently decided to host a page on GitHub for blogging about Cyber Security topics, tutorials, etc. Obsidian, along with the Obsidian Git plugin, seems like the perfect environment for basic work, like writing and sharing new posts. I plan to use Atom for any sort of settings modifications and such, but I really like the display and functionality of Obsidian.

However, I prefer to load images into my posts to help break up the walls of text, and I’m realizing that Obsidian is painful in this integration. Simply copying images into the editor drops the image directly next to the post itself in the file system, instead of into the directory I’d prefer. Additionally, Obsidian’s syntax for images doesn’t match the traditional ![](images/image.png) format.

Proposed solution

What I would prefer is for there to be an option that works better with something like GitHub Pages to allow me to drag and drop attachments into the editor and have it automatically place those attachments into (for example) /attachments/<post title>/attachment_name.ext

This probably would need to have a few modifiable settings to make it work for others. For example, I would prefer to have images automatically dropped into /images, but others might want things placed in different supporting directories.

Current workaround (optional)

The current workaround involves manually copying the attachment into /images, then typing the relative path myself (and avoiding allowing Obsidian to autocomplete, since it forces the Obsidian default image format, which doesn’t work with GitHub Pages).

Unbelively this alredy exists! You just have to look in the settings!

1 Like

Ahh… Wow. It sure does. Thanks for pointing that out, I went through a bunch of the settings when I first installed Obsidian, but I totally missed these as I started my GH Pages project.

Here’s the two settings, for anyone interested.