# What do y'all do about static non-org assets?

**URL:** <https://org-roam.discourse.group/t/what-do-yall-do-about-static-non-org-assets/2636>\
**Category:** How To\
**Created:** [June 3, 2022, 5:26pm UTC](https://org-roam.discourse.group/t/what-do-yall-do-about-static-non-org-assets/2636 "2022-06-03T17:26:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nrvale0](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@nrvale0](https://org-roam.discourse.group/u/nrvale0)\
**Post date:** [June 3, 2022, 5:26pm UTC](https://org-roam.discourse.group/t/what-do-yall-do-about-static-non-org-assets/2636/1 "2022-06-03T17:26:08Z")

</div>

Howdy.

Curious what others are doing for non-Org Mode assets linked from Org Roam nodes? Ex: For work I do many infrastructure diagrams. Some of them are generated from code in an org-babel code block but others are generated with non-Emacs tools. All of them end up generating static assets which I then link from the Org Roam nodes. Ex: jpg, png, svg.

Currently I have an \<Org Roam dir\>/assets directory where I dump things and then link to them from the nodes by path. It would perhaps be more Roam-y to have those assets have at least have an Org ID. For export purposes, it may also make sense to have them be in a directory alongside the node file.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [June 5, 2022, 8:52am UTC](https://org-roam.discourse.group/t/what-do-yall-do-about-static-non-org-assets/2636/2 "2022-06-05T08:52:34Z")

</div>

I just do essentially the same thing as you do: I put images to `images/` subdirectory. I can’t think of a good reason to add an org-ID to static images.

I name them with the same date (in file name like yyyy-mm-ddThhmmss.png); this way it’s easier for me to find them.

---

<div class="post-metadata">

**Author:** ![nrvale0](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@nrvale0](https://org-roam.discourse.group/u/nrvale0)\
**Post date:** [June 5, 2022, 2:04pm UTC](https://org-roam.discourse.group/t/what-do-yall-do-about-static-non-org-assets/2636/3 "2022-06-05T14:04:05Z")

</div>

The main reason I think it might make sense to be able to associate an Org ID with non-Org content is that I often write docs which generate diagrams and viz from Org Babel code blocks which are then referenced in other Org nodes (ex: infrastructure diagrams). If the viz had an ID I could then link to it independent of path and filename (ex: infratructure diagrams). In other environments, such as hugo, I’ve worked with teams that had shortcodes for thing kind of thing.

I’m not much of an elisp hacker but I’m going to play around with setting Org ID Properties on output of Babel code blocks and see where that might get me.

---

<div class="post-metadata">

**Author:** ![ChaoticManifold](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@ChaoticManifold](https://org-roam.discourse.group/u/ChaoticManifold)\
**Post date:** [June 16, 2022, 4:22pm UTC](https://org-roam.discourse.group/t/what-do-yall-do-about-static-non-org-assets/2636/4 "2022-06-16T16:22:36Z")

</div>

Have a look at `org-attach` (see [Attachments (The Org Manual)](https://orgmode.org/manual/Attachments.html)) it essentially automates the adding of a non-org asset to a directory which is associated with the nodes/headlines Org ID. You can then use the `attachment:` link type to link to these assets.

I use this method and am pretty happy with it.

---

<div class="post-metadata">

**Author:** ![nrvale0](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@nrvale0](https://org-roam.discourse.group/u/nrvale0)\
**Post date:** [June 16, 2022, 4:54pm UTC](https://org-roam.discourse.group/t/what-do-yall-do-about-static-non-org-assets/2636/5 "2022-06-16T16:54:17Z")

</div>

This looks quite promising. And it was right there in core org the entire time. :forehead

Thanks for pointing it out!
