# Obsidian

Source: https://frameleaf.app/docs/using/obsidian/

The Frameleaf Images plugin for Obsidian finds photos in the albums you choose and puts them in your notes. Each photo is saved in your vault as an ordinary image attachment, so your notes keep working offline and without Frameleaf.

It works with Obsidian 1.11.4 or later on Mac, Windows and Linux. It doesn't run on Obsidian's phone and tablet apps. It only reads: it never uploads, changes or deletes anything in Frameleaf.

## Install

The plugin ships in the Frameleaf source, in `integrations/obsidian`.

1. Make the release files: `node integrations/obsidian/scripts/release.mjs <folder>`. This writes `main.js`, `manifest.json` and `styles.css`, with their checksums in `SHA256SUMS`.
2. Copy those three files into your vault, in `.obsidian/plugins/frameleaf-images/`.
3. In Obsidian, open **Settings**, then **Community plugins**, and turn on **Frameleaf Images**.

## Connect your library

1. Open **Settings**, then **Frameleaf Images**.
2. In **Library address**, enter your server's HTTPS address, such as `https://photos.example.com`.
3. Leave **App ID (optional)** empty unless your administrator gave you one (see [App ID](#app-id)).
4. Choose **Connect**. Your browser opens Frameleaf. Sign in if asked, within 5 minutes.
5. Choose the albums Obsidian may see, or **Read my whole library**, then choose **Allow**.

Settings then says which server and account you're connected to. Obsidian asks only to see and search your photos, videos and albums.

Your own HTTPS address works without a Frameleaf plan. Connecting through Frameleaf's [remote access](https://frameleaf.app/docs/cloud/remote-access/) needs a plan that includes it.

## Insert a photo

1. In a note, run the command **Insert image from Frameleaf**.
2. Pick an **Album**, or keep **All authorized albums**, and type in **Search** to narrow it down. **Load more** shows more photos.
3. Choose a photo. It's saved in your attachment folder and linked in the note.

The plugin saves Frameleaf's preview of the photo, up to 16 MB, named like `frameleaf-<photo>-<revision>-preview.jpg`. Inserting the same photo again reuses that file. If the photo was edited in Frameleaf, you get the new version as a new file.

Turn on **Add a link to the photo in Frameleaf** to add a **View in Frameleaf** link under each photo you insert.

## App ID

The plugin normally registers itself the first time it connects. If your administrator has turned that off, they register it once:

1. Open **Settings**, then **Who can sign in**, then **Sign-in methods**. Under **Registered apps**, choose **Set up an app**.
2. Under **Name**, choose **Other** and enter `Frameleaf for Obsidian`.
3. In **Sends you back to**, enter `http://127.0.0.1/callback`. The plugin listens on your own computer only while you sign in.
4. Choose **Create** and share the **App ID**. Enter it in **App ID (optional)**.

## Disconnect

In **Settings**, then **Frameleaf Images**, choose **Disconnect**. Obsidian ends its access in Frameleaf and forgets the sign-in. If your server can't be reached at that moment, also remove **Frameleaf for Obsidian** in Frameleaf under **Settings**, then **Your sign-in & privacy**, then **Connected apps**.

Photos you already inserted stay in your vault. To change which albums Obsidian may see, open **Details** for it in **Connected apps**.

The plugin keeps its sign-in in Obsidian's secure storage on that computer, never in your vault's files. It's available in all eleven Frameleaf languages.
