No description
Find a file
mpstaton 769b3b5c61 feat(uploads): uploads local files found in markdown text and replaces
with unique url from image service, for now ImageKit

 On branch development
 Your branch is up to date with 'origin/development'.
 Changes to be committed:
	modified:   README.md
	new file:   add
	new file:   git
	modified:   src/modals/ConvertLocalImagesForCurrentFile.ts
	modified:   styles.css
2025-07-30 02:32:14 +03:00
reference inspect(api-response): add scripts to inspect API response 2025-07-20 20:42:04 +03:00
scripts remove(script): remove script that required another library, opted for 2025-07-20 20:43:59 +03:00
src feat(uploads): uploads local files found in markdown text and replaces 2025-07-30 02:32:14 +03:00
.editorconfig start(project): initial setup from example Obsidian plugin with our developer preferences 2025-06-07 15:37:58 +03:00
.env.example progress(settings): progress on settings ui and accuracy 2025-07-20 19:59:24 +03:00
.eslintignore start(project): initial setup from example Obsidian plugin with our developer preferences 2025-06-07 15:37:58 +03:00
.eslintrc upgrade(packages): all packages are now up to date 2025-06-07 19:20:42 +03:00
.gitattributes start(project): initial setup from example Obsidian plugin with our developer preferences 2025-06-07 15:37:58 +03:00
.gitignore inspect(api-response): add scripts to inspect API response 2025-07-20 20:42:04 +03:00
.npmrc switch(pnpm): add pnpm get rid of npm 2025-06-07 18:25:25 +03:00
.windsurfrules.md improve(styles, setup): improve styles and setup, including a script to 2025-07-19 18:59:26 +03:00
add feat(uploads): uploads local files found in markdown text and replaces 2025-07-30 02:32:14 +03:00
esbuild.config.mjs progress(modal): modal now appearing and API call is now working 2025-07-21 00:01:50 +03:00
git feat(uploads): uploads local files found in markdown text and replaces 2025-07-30 02:32:14 +03:00
LICENSE update(readme, license): udpates to readme and license 2025-07-20 17:17:34 +03:00
main.ts milestone(modal): command launching local to remote images now works 2025-07-21 01:39:47 +03:00
manifest.json feat(uploads): uploads local files found in markdown text and replaces 2025-07-30 02:32:14 +03:00
package.json feat(uploads): uploads local files found in markdown text and replaces 2025-07-30 02:32:14 +03:00
plugin-config.yaml init(project): initialize project Image Gin 2025-07-20 17:07:49 +03:00
pnpm-lock.yaml improve(styles, setup): improve styles and setup, including a script to 2025-07-19 18:59:26 +03:00
README.md feat(uploads): uploads local files found in markdown text and replaces 2025-07-30 02:32:14 +03:00
setup-plugin.mjs improve(setup-script): improve setup script to hopefully work, unsure 2025-07-19 19:04:08 +03:00
styles.css feat(uploads): uploads local files found in markdown text and replaces 2025-07-30 02:32:14 +03:00
tsconfig.json upgrade(packages): all packages are now up to date 2025-06-07 19:20:42 +03:00
version-bump.mjs start(project): initial setup from example Obsidian plugin with our developer preferences 2025-06-07 15:37:58 +03:00
versions.json feat(uploads): uploads local files found in markdown text and replaces 2025-07-30 02:32:14 +03:00

Image Gin Plugin for Obsidian by The Lossless Group

Image Gin for Obsidian

A powerful Obsidian plugin that brings AI-powered image generation directly to your Obsidian workflow. Seamlessly create and manage images using advanced AI models, starting with Recraft's API.

Features

  • AI-Powered Image Generation: Create stunning visuals directly from your notes using Recraft's AI models
  • Seamless Integration: Works natively within Obsidian's interface
  • Flexible Image Types: Generate both banner and portrait images with custom dimensions
  • Smart Frontmatter Management: Automatically updates your note's frontmatter with generated image URLs
  • Customizable Prompts: Fine-tune image generation with custom styles and parameters

Modals

  1. Generate images from an image prompt in your YAML frontmatter. Image Gin Demo Gif: Image Generation from Image Prompt Demo

  2. Convert local images in a file to a remote image service url (only supports ImageKit). Image Gin Demo GIF: Convert Locally Stored Images to a Remote Image Delivery Service URL with ImageKit

Image Gin: Obsidian Community Plugin now uploads local images found in a Markdown file. July 20, 2025

Settings

Image Gin Demo GIF: Settings Page for Image Gin

🚀 Getting Started

Prerequisites

  • Obsidian (v1.8.10 or later)
  • Node.js (v18 or later)
  • pnpm (recommended) or npm

Installation

  1. Clone the repository:

    git clone https://github.com/lossless-group/image-gin-plugin.git
    cd image-gin-plugin
    
  2. Install dependencies:

    pnpm install
    
  3. Build the plugin:

    pnpm build
    
  4. For development with hot-reloading:

    pnpm dev
    

🛠️ Configuration

  1. Get your Recraft API key from Recraft's website
  2. Open Obsidian and navigate to Settings > Community Plugins
  3. Find "Image Gin" in the list and enable it
  4. Click on the gear icon to configure your API key and default settings

🖼️ Usage

  1. Open a note where you want to generate an image
  2. Use the command palette (Cmd/Ctrl+P) and search for "Generate Image"
  3. Enter your image prompt and adjust settings as needed
  4. Click "Generate" and watch your image come to life

📝 License

This project is open source and available under the The Unlicense.

Getting Started

If you want to use the setup-plugin.mjs script, fill out plugin-config.yaml and then make it an executable file.

chmod +x setup-plugin.mjs

When run, it will create the basic metadata and fill in the template variables. If you don't need it, just delete it and happy hacking.

Run the script with

node setup-plugin.mjs
pnpm install
pnpm add -D esbuild @types/node builtin-modules
pnpm build
pnpm dev

Packages, Dependencies, Libraries:

"devDependencies": {
   "@types/node": "^24.0.12",
   "@typescript-eslint/eslint-plugin": "8.36.0",
   "@typescript-eslint/parser": "8.36.0",
   "builtin-modules": "5.0.0",
   "esbuild": "0.25.6",
   "eslint": "^9.30.1",
   "obsidian": "latest",
   "tslib": "2.8.1",
   "typescript": "5.8.3"
},
"dependencies": {
   "@modelcontextprotocol/sdk": "^1.15.0",
   "fastify": "^5.4.0",
   "zod": "^4.0.0"
}

If you're like us, you have a directory housing all your code projects. To use your plugin as you develop it, just create a symbolic link. Here is my example, but you will need to use your own path structure:

ln -s /Users/mpstaton/code/lossless-monorepo/obsidian-plugin-starter /Users/mpstaton/content-md/lossless/.obsidian/plugins/