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
@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
- Copy paste a part of your note and send it to a friend, with all the images.
- Re-use images between vaults.
I’m super happy with it
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,
- Configure the attachment folder path, for example, ‘images’
- Add this folder to the file .gitignore, so GIT does not version it.
- 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
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.
Would it be possible to build something like what ImageOptim does into Obsidian?
It could be optionally enabled, as suggested above, since it does add some CPU overhead?
I’m manually doing this now going forward with images I drag into notes, which I in turn use primarily to build tutorials for my students.
I saw a 50% reduction in total size of image assets, a pretty incredible improvement.
Hi All, I’ve come here from Open question - Using the Imgur plugin, how secure is it, into the future?, thanks to @Olondre for directing me here
I use ShareX - The best free and open source screenshot tool for Windows
You can set it to save in .jpg, and set the compression level to your preference
(I’ve been uploading my non-sensitive images to Imgur for the past year, and have now decided it has to stop, so what now, I enjoy visually interesting notes)
Exactly what I was thinking, after having used it extensively for a year!
This is what I’m now considering.
Anyhow, hope this helps with image compression
I too saw this plugin and was wondering if anybody had any reviews on it.