Pasted Images - convert to jpg instead of png?

Hello,

i have a very image heavy vault and every time i paste an image into it (from my clipboard) it gets converted into .png. My vault is now over 1gb big. With .jpg it would be only around 150 mb. How can i change that for future images, i want my images to be converted into .jpg instead of .png or atleast i want them to have the same format as the source image. Most of the time that is .jpg.

My images come from google searches or other websites.

Thanks and best regards
Net

Not a direct solution to your question, but may be a useful temporary fix:

Imgur plugin for pasting images

There’s a new plugin designed for this exact case: musug/obsidian-paste-png-to-jpeg: When pasting screenshots into obsidian notes, convert the images to jpeg and compress them

1 Like

Obsidian isn’t converting it to png. That is just what is in your clipboard. If you copy a jpg it will paste a jpg. When you copy from Google images by right-clicking in your browser, it seems to copy a png, not the image directly. (Tested this in Chrome anyway.)

And you can see if you paste into this forum it will also be a png. So it isn’t Obsidian.

For questions like this, you should mention what OS you are using. Because for example, in MacOS there are built-in tools to be able to convert images to jpg, and I think you can even set the built-in screenshot tools to use jpg instead of png. Maybe in Windows screenshots too.

(Edit: I didn’t see how old this thread was. ha! Also that conversion plugin sounds cool, and I’ll check it out too!)

Here is the decision of your problem.

  1. Place all images in one folder inside Obsidian. So you can be sure you don’t loose links

  2. Copy this folder to somewhere.

  3. Change file size and format to what you want. For example with Adobe Photoshop actions or Affinity Photo batch job, Acdsee batch resize. You can use any batch images processing program.

  4. Change new JPG files extensions back to PNG with Total Commander or any batch rename program.

  5. Copy your new fake png files and replace the old one, or you can save old big PNG files if you need them. Obsidian will open JPG files even they have PNG extensions.

5.2 You can rename your database PNG links to JPG if you want with uhm… Sublime text 3 This program have batch find-replace function for many files. For my opinion it’s easier to rename JPG files to PNG :smiley: than rename links in the base.

  1. Enjoy your new small database. :smiley: