README file from
GithubCleanShot Embed
An Obsidian plugin that renders CleanShot share URLs (cln.sh/XXX) as inline images in reading view.
Why?
CleanShot share URLs are permanent, but they link to a landing page — not a direct image. The direct image URL is a signed CloudFront URL that expires. Downloading images locally wastes your Obsidian Sync storage quota.
This plugin fetches a fresh signed URL at render time and displays the image inline. No files are stored in your vault.
How it works
- MarkdownPostProcessor intercepts rendered HTML in reading view, finds CleanShot links, and replaces them with
<img>elements. requestUrlfrom the Obsidian API fetches the CleanShot share page (bypasses CORS).- Extracts the signed image URL from the page's embedded JSON data.
- In-memory cache avoids refetching the same URL on re-renders. Cleared on plugin unload.
- Graceful fallback — if the fetch fails, shows the original URL as a clickable link.
Usage
- Paste a CleanShot share URL (e.g.
https://cln.sh/LQtyfqN5) into any note - Switch to Reading View — the URL renders as an inline image
- Click the image to open the original share page in your browser
Supported URL formats
https://cln.sh/XXXXhttps://share.cleanshot.com/XXXX
Installation
From Community Plugins
Search for "CleanShot Embed" in Obsidian Settings > Community Plugins.
Manual
- Copy
main.js,manifest.json, andstyles.cssinto.obsidian/plugins/cleanshot-embed/ - Reload Obsidian
- Enable "CleanShot Embed" in Settings > Community Plugins
Notes
- Desktop only (
requestUrlCORS bypass is not available on mobile) - Images are never saved to your vault — zero impact on Obsidian Sync storage
- Signed URLs are fetched fresh each session, so images continue to work even after CloudFront URLs expire