Change "Pasted image" to "Pastedimage" or "Pasted_image"

Steps to reproduce

When pasting an image there is spaces in the filename.

this results in filenames like: “Pasted%20Image”

Expected result

Removing spaces for pasted images

Please change this to:
“Pastedimage” or “Pasted_image” or “Pasted-image”

This will give better compatability with github markdown. When you see a markdown file with images on github.

Actual result

this results in filenames like: “Pasted%20Image”

Environment

  • Windows

8 Likes

this looks like a feature request… moved to FR

2 Likes

I use this plugin

1 Like

Using some predefined naming schema is not a solution for me. I need to customize the naming myself - Or just remove spaces or use underscore “_” instead.

The problem is that Obsidian uses spaces when pasting, like “Pasted Image” and I do not want spaces in the filename.

Why you might ask?
Because I do backups to Github and Obsidian replaces spaces with “%20” in my setup. But when you view the markdown file in github, it cant find the file when there is “%20” in the filename.

2 Likes

Exactly the problem I’m facing. How can the devs be so stupid, that they decided on a default name with spaces!!?

Exact steps (remove all spaces - both links and attachment filenames):

  1. Search ‘Attachment name formatting’ under community plugins. Plugin by JYC333
  2. Install it. Enable it.
  3. Configure the separator in the plugin settings. Optional
  4. Open the command palette, type ‘scan files’, and select “Attachment Name Formatting: Scan Files in the Folder”.
  5. Select the ‘/’ folder. Press enter.

Done.

1 Like

This doesn’t seem to apply to pasted images.

And to the other guy. I certainly wouldn’t call the developers stupid because they didn’t implement things the way you would have.

Since you’re so smart, can I assume you submitted a pull request with your fix in it?

I would have, but Obsidian isn’t open-source. And you don’t need to be smart to avoid spaces, it is a well-known source of problems, especially if you have a plugin ecosystem.

1 Like

+1 on this. Would be nice to remove anything that could cause %20 in file names automatically by Obsidian. We can add them back if we want but when pasting images or anything else, have it replace spaces with underscores or remove them altogether is best.

1 Like

Attachment Management by trganda is another community plugin that can address this use case entirely, while you are waiting to see if this is implemented in core.

1 Like