Image to HTML
by 0x1DA9430
Score: 15/100
favorite
share
Description
Category: Note Enhancements

The Image to HTML plugin enhances how pasted images are handled in Obsidian by converting them into HTML image tags instead of the default markdown or wikilink formats. This approach improves compatibility when sharing notes across platforms or with editors that don’t support Obsidian’s native syntax. Users can customize the image width and define where images are saved, either relative to the note or within a fixed directory.

Stats
0
stars
37
downloads
0
forks
6
days
9
days
9
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits
Latest Version
10 days ago
Changelog

Release 1.0.2

README file from

Image to HTML

中文文档

A plugin for Obsidian that converts pasted images to HTML format instead of Obsidian's wikilink or Markdown format.

Features

  • Saves pasted images as files and inserts them as HTML image tags
  • Supports custom image width
  • Supports custom image save paths (e.g., ./assets)
  • Optional alt attribute for better accessibility
  • Optional paste notifications

Why HTML Format?

HTML image tags offer better compatibility across different platforms compared to Markdown or Obsidian's wikilink format. This is particularly useful for users who need to share their notes across different platforms and Markdown editors.

Usage

  1. Install the plugin in Obsidian
  2. Copy an image (from browser, file explorer, or screenshot tool)
  3. Paste in the Obsidian editor
  4. The image will be saved and inserted as HTML: <img src="image_name.jpg" width="auto">

Custom Image Path

You can enable the "Use Custom Image Path" option in settings and set a custom save path for your images:

  • Relative paths (e.g., ./assets or ../images): Images will be saved in the specified directory relative to the current file
  • Absolute paths (e.g., assets or images): Images will be saved in the specified directory under your vault root

When custom path is enabled, the src attribute in HTML tags will be updated accordingly, for example:

<img src="./assets/image_1234567890.jpg" width="auto">

If custom path is disabled, images will be saved in the same directory as the current file, and the HTML tag will only use the filename:

<img src="image_1234567890.jpg" width="auto">

About Alt Attribute

By default, the plugin generates HTML tags without the alt attribute to keep the code concise. If you need better accessibility or SEO optimization, you can enable the "Include Alt Attribute" option in settings, which will generate tags like:

<img src="image_1234567890.jpg" width="auto" alt="image_1234567890.jpg">

Settings

  • Image Width: Set the image width, can be pixels (e.g., 500px), percentage (e.g., 100%), or auto
  • Use Custom Image Path: When enabled, images will be saved to the specified path instead of the current file's directory
  • Custom Image Path: Set the image save path, can be relative (e.g., ./assets) or absolute (e.g., assets)
  • Include Alt Attribute: When enabled, HTML image tags will include the alt attribute for better accessibility and SEO
  • Show Notifications: Choose whether to show notifications when pasting images

Installation

From Obsidian Community Plugins

  1. Open Obsidian Settings
  2. Go to "Community Plugins"
  3. Disable "Safe Mode"
  4. Click "Browse"
  5. Search for "Image to HTML"
  6. Click Install
  7. Enable the plugin

Manual Installation

  1. Download the latest version of main.js, manifest.json, and styles.css
  2. Copy these files to your vault's .obsidian/plugins/img2html/ directory

Development

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Run npm run dev to start compilation in watch mode
  4. Copy main.js and manifest.json to your vault's .obsidian/plugins/img2html/ directory for testing

License

MIT

Similar Plugins
info
• Similar plugins are suggested based on the common tags between the plugins.
Image Window
3 years ago by Jeremy Valentine
Adds the ability to open images in new Obsidian windows
Copy as HTML
3 years ago by Bailey Jennings
A simple plugin that copies the selected text to your clipboard as HTML
Chevereto Image Uploader for Obsidian
3 years ago by kkzzhizhou
obsidian plugins: chevereto image uploader
Paste image rename
3 years ago by Reorx
Renames pasted images and all the other attachments added to the vault
Obsidian Enhancing Export
3 years ago by YISH
This is an enhancing export plugin base on Pandoc for Obsidian (https://obsidian.md/ ). It's allow you to export to formats like Markdown、Markdown (Hugo https://gohugo.io/ )、Html、docx、Latex etc.
Image Gallery
3 years ago by Luca Orio
A zero setup masonry image gallery for Obsidian
Copy document as HTML
2 years ago by mvdkwast
Obsidian plugin: copy document as HTML, including images
Emo
2 years ago by yaleiyale
Use image/file hosting in Obsidian by clipboard or draging file. Obsidian 图床聚合 & Github上传器
Image Layouts
2 years ago by Luke Chadwick
Obsidian markdown export
2 years ago by bingryan
This plugin allows to export directory/single markdown to a folder. support output format(html/markdown)
Paste As Html
2 years ago by maotong06
Webpage HTML Export
2 years ago by Nathan George
Export html from single files, canvas pages, or whole vaults. Direct access to the exported HTML files allows you to publish your digital garden anywhere. Focuses on flexibility, features, and style parity.
Image Captions
2 years ago by Alan Grainger
Add captions to images with inline Markdown and link support. The caption format is compatible with the CommonMark spec and other Markdown applications.
Custom Classes
2 years ago by Lila Rest
A minimal Obsidian plugin that allows you to add your own HTML classes to chosen Markdown elements directly from your notes.
Awesome Image
2 years ago by AwesomeDog
One-stop solution for image management.
Avatar
2 years ago by froehlichA
An obsidian plugin for displaying an avatar image in front of your notes.
Image OCR
2 years ago by kaffarell
Runs ocr on pasted images and posts result in details box. This allows to search in images.
Image To Lskypro
2 years ago by NekouTarou
支持直接上传图片到图床Lsky,基于https://github.com/renmu123/obsidian-image-auto-upload-plugin.git改造。
Html Server
2 years ago by Pr0dt0s
Obsidian plugin to serve a vault as an html site.
Cloudinary
2 years ago by Uday Samsani, Jordan Handy
Cloudinary plugin for content uploading and transformation.
Image Converter
2 years ago by xRyul
⚡️ Convert, compress, resize, annotate, markup, draw, crop, rotate, flip, align images directly in Obsidian. Drag-resize, rename with variables, batch process. WEBP, JPG, PNG, HEIC, TIF.
Media Sync
2 years ago by fnya
Media Sync is Plugin for Obsidian
Qiniu Image Uploader
a year ago by Jade Zheng
Uploads images from your clipboard to qiniu.com and embeds uploaded image to your note.
Image2LaTEX
a year ago by Hugo Persson
This is a plugin for obsidian that will read your latest copied image from clipboard and generate math latex from it
Markdown Image Caption
a year ago by Hananoshika Yomaru
Generate image caption easily. Completely markdown-based.
Paste Link
a year ago by Jose Elias Alvarez
Intelligently paste Markdown links in Obsidian.
Image Helper
a year ago by Chongmyung Park
Context menu to convert a image to another format in reading view in Obsidian.md
Paste From History
a year ago by Daniel Karakka
Obsidian plugin that adds the ability to paste text from Obsidian's clipboard history.
Image Inline
a year ago by Zackary W
convert images into base64 encoded strings and embed them directly within your notes
Image Collector
a year ago by tdaykin
Paste transform
a year ago by Timofey Koolin
Copy as source
a year ago by @gapmiss
Select and copy source HTML in reading view in Obsidian.md
Image Magician
a year ago by luxmargos
This is a plugin for Obsidian (https://obsidian.md). Supports viewing and exporting various image formats using ImageMagick.
Tiff Viewer
a year ago by Jan Ullmann
An obsidian plugin to easily convert tiff files to png so that they can be displayed in obsidian
Line Commands
a year ago by charliecm
Adds commands to quickly select, copy, cut, and paste lines under the selection or cursor.
Smart HTML Select
10 months ago by Isaia Riva
An Obsidian plugin to insert a smart HTML select element into the editor
ii
10 months ago by Wilson
The main feature of this plugin is to quickly insert common Markdown code and HTML code, including Sup, Sub, Audio, Video, Iframe, Left-Center-Right Alignment, Variables, Footnotes, Callout, Anchor Points, HTML Comments and so on.
Image Metadata
9 months ago by alexeiskachykhin
Adds image metadata editing capabilities to Obsidian
Paste as Embed
8 months ago by Matt Laporte
Obsidian plugin to paste contents of clipboard into a new note, and embed it in the active note.
Fast Image Auto Uploader
8 months ago by Longtao Wu
upload images from your clipboard by gopic
Paste URL into selection
4 years ago by Denis Olehov
Paste URLs into selected text "notion style"
Text expand
4 years ago by MrJackphil
A simple text expand plugin for Obsidian.md
Image in Editor
4 years ago by Ozan Tellioglu
This Obsidian plugin to view Images, Transclusions, iFrames and PDF Files within the Editor without a necessity to switch to Preview.
Clear Unused Images
4 years ago by Ozan Tellioglu
Obsidian plugin to clear the images that are not used in note files anymore
Image auto upload
4 years ago by renmu123
auto upload image with picgo
Image Context Menus
4 years ago by NomarCub
Image Context Menus - Obsidian.md image context menus: copy, open in default app, show in system explorer, reveal in navigation context menu. Also Open PDF externally context menu.
Paste Mode
4 years ago by Jacob Levernier
Obsidian Notes plugin for pasting text and blockquotes to the cursor's current level of indentation.
Image Toolkit
4 years ago by sissilab
An Obsidian plugin for viewing an image.
Mousewheel Image zoom
3 years ago by Nico Jeske
An Obsidian plugin that enables you to increase/decrease the size of an image by holding down a configurable key (defaults to left alt), hovering over an image in preview mode and scrolling.
Enhanced Image
6 months ago by situ2001
Enhance the experience of image in Obsidian, seamlessly.
Pexels Banner
6 months ago by Justin Parker
🚩 Enhance your Obsidian notes with customizable banner images, including AI-generated designs and a curated store of downloadable banners. Transform your workspace with visually stunning headers that add context, improve aesthetics, and take your note-taking beyond the ordinary.
Remove HTML Tag
6 months ago by ChenPengyuan
Find Orphaned Images
5 months ago by Josmar Cristello
Find Orphaned Images is an Obsidian plugin designed to help you keep your vault clean and organized by identifying and managing images that are not linked anywhere in your notes.
复制图文 (Copy Image Text)
5 months ago by msgk
obsidian插件,复制笔记内容(包括文本和图片)到剪贴板
PDF2Image
5 months ago by RasmusAChr
Arweave Uploader
5 months ago by makesimple
Featured Image
5 months ago by Johan Sanneblad
Obsidian plugin to automatically set a featured image property in your notes based on the first image, YouTube link, or Auto Card Link image found in your document. This allows you to create rich note galleries using Folder Notes and Dataview.
Image Tools
4 months ago by Andrey Serov
Insta TOC
4 months ago by Nick C.
Generate, update, and maintain a table of contents for your notes while typing in real time.
Image Uploader For Note
4 months ago by Yunfi
Upload images in a note, and if the image is only used in this note, delete it from vault.
Paste Image Into Property
a month ago by Nito