# Image Dither - Obsidian Plugin Intercepts images pasted or dropped into notes so you can aestehtically dither and resize them, saving storage space ![dith-1](https://github.com/user-attachments/assets/6e9f7146-7124-4ac9-9519-023a4d50e9c0) ## Features ### Major storage savings! image ### Dithering algorithms Original (2.8MB) image Photo by SwapnIl Dwivedi on Unsplash | Visual Example | Algorithm | Description | | :--------------------------------------------------------------------------------------------------------------------------------------- | :------------------ | :---------------------------------------------------------------------------------------- | | image 272KB | **Floyd-Steinberg** | Error-diffusion; best tonal quality | | image 161KB | **Blue Noise** | Interleaved gradient noise; organic, film-grain-like pattern with no repetition artifacts | | image 190KB | **Ordered (Bayer)** | Matrix-based; structured pattern | | image 82KB | **Threshold** | Hard cutoff; most aggressive | | image 690KB | **Grayscale** | Smooth grayscale conversion; no dithering | ### Controls (per image) - **Threshold** — black/white cut point (0–255) - **Sharpness** — error spread amount (0–100%) - **Brightness / Contrast** — pre-dither adjustments (−100 to +100%) - **Resize** — output scale (10–100% of original dimensions) - **Invert colors** — flip output black/white ### Presets - **Natural Dither** — Floyd-Steinberg at full size; best default - **High Contrast** — Threshold algorithm at full size; bold black/white - **Blue Noise** — Interleaved gradient noise at full size; organic grain - **Grayscale** — Smooth grayscale conversion at full size - **Auto (max compression)** — tests all presets and picks the one with the smallest output ### Transparency support The alpha channel is never modified. Transparent PNGs remain transparent after dithering. ### Compression feedback - Live size display for original and dithered output (e.g. `1.2 MB → 48.3 KB`) - Percentage saved with color-coded indicator (good / warn / danger) - Running total of bytes saved across all uses, shown in Settings image ### Output filename The dithered filename is pre-filled in the modal using a configurable template and can be edited before saving. Supported tokens: | Token | Replaced with | | ------------- | --------------------------------------- | | `{original}` | Original filename without extension | | `{algo}` | Algorithm name (e.g. `floyd-steinberg`) | | `{resize}` | Resize percentage (e.g. `75`) | | `{timestamp}` | ISO timestamp at time of save | Filenames are automatically deduplicated. If the target name already exists in the folder, a numeric suffix is appended. ## Settings image | Setting | Default | Description | | -------------------------- | ------------------- | -------------------------------------------------------------------------------------- | | Enabled | On | Toggle paste/drop interception | | Default preset | Natural Dither | Preset applied when the modal opens | | Default output width (px) | 700 | Snaps resize % to the closest value for each image; leave blank to keep original width | | Dithered filename template | `{original}-dither` | Tokens: `{original}`, `{algo}`, `{resize}`, `{timestamp}` | ## Commands - **Image Dither: Enable** — turn interception on - **Image Dither: Disable** — turn interception off The ribbon icon also toggles the plugin on/off. ## Output format Images are always saved as **PNG** to the attachment location in specified in your Obsidian preferences > Files and links. ## More examples ![dither-demo1](https://github.com/user-attachments/assets/eb5be8ee-c028-4cf1-b581-482027eb7340) image image image image image image image