Compress images when pasted into Obsidian

I frequently screen shot + paste into Obsidian notes. E.g. I am watching someone give a zoom presentation, so I screen shot slides and paste them into a note. As a result, I’ve got over 1 gig of images in my notes. This becomes a pain when I then push to github. Would be good if before saving the images, they could be passed through an image compression algorithm.


this is a great idea. This is essential specially for image heavy notes. A big reason why I avoid to have too many images is because of this fact.

I also push things to a private repo in github for backup, but I also have my Notes of Drobox for quick syncing, since I only have a free 2GB storage, images are definetly a problem.

Even for Obsidian sync, I’m not sure what will end up being the storage limit, but having smaller size images would still be beneficial.

As a plugin

Of course not everyone will want their image qualities to downgrade, which is why ithink a plugin that allows the user to compress to a certain degree (50% compression, 25% compression) or even dimensions, that’d be great.

Only if this was optional I‘d agree.


yeah I feel it would need to be an optional feature, in the best of cases with a nice settings panel to choose the level of compression.

but in the simplest of versions even just a toggle in the settings

with a toggle for

compression -⟐---- no compression

1 Like

@Andorin , I recomend you the ‘imgurl’ plugin. It allows you to store images in imgur, and avoid keeping binaries in your GIT.

It also unlocks other possibilities, such as

  1. Copy paste a part of your note and send it to a friend, with all the images.
  2. Re-use images between vaults.

I’m super happy with it :slight_smile:


that’s an awesome suggestion, thanks @cristian I’ll try it out

Great idea in principle, thanks for suggesting @christian. Many of the images that I post are confidential though, so while it’s unlikely anything of commercial value would get posted & seen… I probably shouldn’t do that with every image that I take a note of (which is -a lot-).

I also don’t really like the idea that all my images could get deleted if/when imgur goes bankrupt.

Another alternative could be to seperate where the images get saved from where the notes are saved. Then the notes could be pushed to github, while the images are just backed up to e.g. gdrive/onedrive/dropbox

I think this could be easy to set up,

  1. Configure the attachment folder path, for example, ‘images’
  2. Add this folder to the file .gitignore, so GIT does not version it.
  3. Link the attachment folder path to dropbox. (in Linux would be to make a symbolic link)

Why not compress images into avif image format??

Keep in mind that Imgur deletes un-viewed images after 6 months. I have lost multiple images that were hosted on Imgur over the last 10 years. I will never use their service anymore unless it is for a temporary image share.


Waw! this is good info!. thanks

1 Like

There’s a new plugin that should help with this: musug/obsidian-paste-png-to-jpeg: When pasting screenshots into obsidian notes, convert the images to jpeg and compress them.