Plugin: Simple Image Resize [v1.0.3, 2025-08-26]

NOTE:
My coding knowledge is currently very limited. This plugin was created entirely with AI tools, and I may be limited in my ability to fix any issues.

Simple Image Resize

A Joplin plugin that provides a simple dialogue to switch image syntax between markdown/html and losslessly resize images (inside the markdown editor) by setting the width/height attributes.

resize-example

NOTE: In-editor image rendering of HTML embedded image in the above example is provided by the Rich Markdown plugin

How to use

In the markdown editor, highlight the text for an image embed, and then right click | Resize Image.

This will open a simple image resize dialogue, the following options are provided.

Switch image syntax

You can switch the image syntax between markdown (![alt text](:/resourceId)) and HTML (<img src=":/resourceId" alt="alt text" width="315" height="238" />).

HTML Syntax is selected by default (and resizing is only supported using HTML syntax). You can switch to markdown syntax if you want to revert the image to a standard markdown image embed without a custom size.

Resize Image

With image syntax set to HTML, you can resize the image by Percentage (default) or Absolute size.

Enter the desired image size (in percentage or pixels) and click OK, and the plugin will populate the clipboard with the new image syntax (HTML syntax with the specified width/height). You can then paste to overwrite the original image embed with the new one.

NOTE:
When using absolute size, populating one of the dimensions and leaving the other blank will automatically maintain aspect ratio.

Settings

You can choose if the default resize mode is Percentage or Absolute in the plugin settings (default is Percentage).

Other notes

  • The plugin only works if it finds a complete image embed in the highlighted text.
  • The plugin will not work if more than one image embed is found in the highlighted text (you will see a toast message that multiple images are selected).
1 Like

Versions 1.0.1 - 1.0.3:

  • Show clear message when invoking command from rich text editor instead of cryptic error
  • add missing attributes to radio boxes, fixes issue where you couldn't toggle percentage/absolute size by clicking the text next to the box
  • Improve wording on info toast messages
  • dynamically register context menu, so context menu entry only shows in markdown editor context menu
  • preserve trailing whitespace, streamlines resizing images on their own line. Just double click to select the image (which sometimes selects the trailing newline in joplin) > resize image > paste and it will preserve the original trailing newline(s), if there were any in the original selection.
  • prevent accidentally pasting over other text after resizing if user accidentally included additional text in selection (and selection also contained a complete image embed). You will now see a toast message if (non-whitespace) text is included in selection in additional to a complete image embed