<?xml version="1.0" encoding="UTF-8"?><oembed><type>video</type><version>1.0</version><html>&lt;iframe src=&quot;https://www.loom.com/embed/ac85dc0a4df9411c84858e965dadb86f&quot; frameborder=&quot;0&quot; width=&quot;1662&quot; height=&quot;1246&quot; webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;</html><height>1246</height><width>1662</width><provider_name>Loom</provider_name><provider_url>https://www.loom.com</provider_url><thumbnail_height>1246</thumbnail_height><thumbnail_width>1662</thumbnail_width><thumbnail_url>https://cdn.loom.com/sessions/thumbnails/ac85dc0a4df9411c84858e965dadb86f-2fa2b77303cf9d67.gif</thumbnail_url><duration>125.733</duration><title>Rewriting Roam and Obsidian Asset Links</title><description>This Loom explains the implementation of the RewriteAssetLinks function that rewrites markdown links for assets stored in SuperBase. It takes markdown from Roam or Obsidian, identifies asset links based on file references, uses stored SuperBase asset URLs, and replaces the original links in the markdown. A key subtlety is that Roam link patterns depend on asset type partly determined by MIME type, so a MIME type library was added (about 23k right now) as a first approximation. If the source is Obsidian, it uses a single link pattern and detects the type of file to decide the correct Roam markdown output, with testing also mentioned.</description></oembed>