Glitch: images cannot be found error in markdown

I am experiencing some inexplicably bizarre behavior when pasting images in Obsidian.

All images paste fine if I’m in Wikilinks mode. They appear fine. No problem.

“Some” images that I paste from my desktop will appear only in Wikilinks mode. If I convert the page to markdown mode, the images disappear and I get an error message, that says the image cannot be found. E.g., here’s the error message for a screenshot pasted from my desktop on MacOs:

“_resources/Screenshot 2024-01-03 at 4.57.44” could not be found.

The problem file shows this syntax in markdown mode:

![](_resources/Screenshot%202024-01-03%20at%204.57.44 PM.png)

If I convert the page to Wikilinks (using Obsidian Link Converter plugin) it displays properly. Convert the page back to markdown and I get that error message and the image won’t display.

BUT the problem does not happen with some other screenshots from my desktop!

E.g., this file pastes fine and displays properly whether I switch to markdown or wikilinks:
Screenshot 2023-11-27 at 6.23.39 PM.png

The markdown syntax for that file is virtually identical:

![](_resources/Screenshot%202023-11-27%20at%206.23.39%20PM.png)

Took me the longest time to figure out what’s happening, but I cannot say why it’s happening. At first I thought the problem was happening randomly. It’s not random: all of the problem files are created in 2024. Screenshots created in 2023 are okay. I’ve reduplicated this result repeatedly with other screenshots from 2023 and 2024 with the same result.

I tried changing the filename of the problem file to 2023 but that won’t work. However if I rename the file to have no spaces, it works fine.

So it seems to have something to do with the attributes or metadata time stamp, and spaces in the name. This is so bizarre. I’m really curious to see if it’s reproducible by anyone else. Strange, strange, strange. It really makes no sense to me at all.

Seriously, I’m not making this up.

I’m on MacOS Sonoma 14.2.1 (23C71), BTW.

1 Like

In your post, you used two different formats for markdown links, namely

  1. ![](_resources/Screenshot%202024-01-03%20at%204.57.44 PM.png)
  2. ![](_resources/Screenshot%202023-11-27%20at%206.23.39%20PM.png)

The former will not work, because the whitespace before “PM” is not properly encoded (i.e. replaced with %20; see here) like in the latter. I think the latter should work.

Does the problem occur when you replace the whitespace with %20? If so, I don’t have any ideas.

1 Like



Please read my previous reply again and correct the link shown in your screenshot. It should end with ...44%20PM.png if the original file name has a whitespace between “44” and “PM”.

Good pickup. I didn’t see that (it was late and hard to see in Obsidian).

I replaced the space with %20. Still doesn’t work. No image.

Strange:

Here’s name of the “problem file” (copied from Finder):
Screenshot 2024-01-03 at 4.57.44 PM.png

Here’s the “good file”:
Screenshot 2023-11-27 at 6.23.39 PM.png

If I replace the name of the problem file with the name of the good file, the problem goes away. It pastes properly, does not miss replacing the space with %20, image shows up in markdown mode.

If I replace the name of the good file with the name of the problem file, it won’t work (misses replacing the space before PM with %20, image won’t display).

I uploaded the images in question (above). Curious if someone else can reproduce this. Also uploaded a screenshot of what I’m seeing in Obsidian (Hah! That screenshot would not display in Obsidian until I renamed it).


Check this out:

If I rename the problem file simply by deleting the letters PM, the problem goes away!

So, this works:
Screenshot 2024-01-03 at 4.57.44.png

This does not:
Screenshot 2024-01-03 at 4.57.44 PM.png

BUT if I manually put the PM back, it works.

So, the markdown in Obsidian with the problem file:

![](_resources/Screenshot%202024-01-03%20at%204.57.44 PM.png)

And here is the markdown when I remove the PM, save it, and then rename it with the PM again (replaces the space with %20, works as expected):

![](_resources/Screenshot%202024-01-03%20at%204.57.44%20PM.png)

The I’m at a total loss. I know this sounds crazy. It makes no sense to me. All I know is that I cannot use markdown in Obsidian.

Thanks, ush.

I do understand what you’re saying. My apologies that I’m not communicating clearly. I understand the %20 thing, that all spaces need to be replaced with that.

what I’m saying is that when I paste a file created with 2024 in the name, it does not add the %20; there’s a space there and of course it won’t work:

![](_resources/Screenshot%202024-01-03%20at%204.57.44 PM.png)
“_resources/Screenshot 2024-01-03 at 4.57.44” could not be found.

That doesn’t happen with files older files.

Then I replace that space with %20, and it still doesn’t work:

![](_resources/Screenshot%202024-01-03%20at%[email protected])
“_resources/Screenshot 2024-01-03 at [email protected]” could not be found.

Then, in Finder, I remove PM from the filename and save it, then I rename it again with a space and PM at the end (the way the original file was named!), and now it works:

	![](_resources/Screenshot%202024-01-03%20at%204.57.44%20PM.png)

The problem is that the only way to get it to work to paste that file in Obsidian is to rename it in Finder.

Also, it’s inconsistent that if I paste other files with an older date, there’s no problem. It does not leave the space. The problem file doesn’t behave that way: it leaves one space at the end and does not replace with %20; even if I modify the link in Obsidian to replace the space with %20, it still won’t work. I have to rename the file in Finder for it to paste properly.

I’m attaching a full screenshot with what I’m describing (see below).

Note that in the _resources folder both screenshot files have the same name!

That’s true in fact in Finder as well! Two files with the same name in a folder! Note:

This should never happen. A file posted into a folder with a file with the same name should be incremented, but it’s not. So there’s some kind of non-visible character or attribute or “something” that’s being added to the name that is messing things up.

I just updated my OS to Sonoma. I’m suspecting Apple made some kind of change that’s doing this.

Update.

Found a handful of other posts on reddit and elsewhere that suggest this isn’t an unheard of issue.

still have not resolved anything.

This webpage (Pasted screenshot images fail to display) suggested a few troubleshooting tips:

I’ve found that the problem occurs also in a Sandbox vault.
I turned on restricted mode; made no difference. So not plugin related.
No snippets.

I’m running Obsidian Version 1.5.3 (Installer 1.4.16).

IDK if any of this makes sense to anyone (way over my paygrade), but this talks about a “PNG file signature spec” that could be a problem: Pasted Screenshots images fail to display.

Not making any progress at all.

I can paste jpg files, images from the internet, older or renamed png files with no problem. But as it stands there’s something about these specific png files that makes markdown mode unusable for me; I’d have to manually modify those screenshots in finder before pasting.

1 Like

UPDATE: Workaround

Never solved this problem. It is a clear glitch that for some unknown reason, Obsidian markdown mode has problems with images with a timestamp that contains AM or PM. Very odd.

My workaround: I tweaked (in terminal) my screenshots so they default to jpg instead of PNG; I also tweaked MacOS preferences to use military time instead of U.S AM/PM. So, basically changed the default screenshot format to get rid of the ‘PM’. Problems go away.

I can’t say why that works, but it works.

I’m not going to mark this solved, as it is a clear glitch and like I said, this is just a workaround. Would love to know what the issue is.

If you’re able to reproduce the behavior in the sandbox vault (found in the help menu that’s on the left ribbon), a bug report would be justified.

Thnx, Cawlin. That’s helpful. Will do it.

Yeah, it happens in Sandbox as well, even in Restricted Mode.

1 Like

SO I took the title and threw it in a URL encoder and it works with the result of that. Apple definitely updated something and there IS a space between the time and the AM/PM but it’s not a standard %20 space.

File name: Screenshot 2024-01-26 at 1.13.34 PM
What Obsidian tries to use: Screenshot%202024-01-26%20at%201.13.34 PM.png :x:
What doesn’t work: Screenshot%202024-01-26%20at%201.13.34%20PM.png :x:
What works: Screenshot%202024-01-26%20at%201.13.34%E2%80%AFPM.png :white_check_mark:

Fix: %E2%80%AF
My search for that came out to be a narrow no-break space,

My guess is obsidian just doesn’t recognize it by default. So until they fix it, in order for the image to be recognized, you would have to either enter the encoding manually or change the name of the image.

1 Like

Great work. I learned of this very issue when the bug-report people combined this post with this one: Unable to attach screenshot images in macOS 14.0 when Wikilinks turned off (urlencode (U+202F) char)

And, yes, it appears to be some kind of “half-space” charater (U+202F,or   ) instead of the space character between the time and ‘AM/PM’. This prevents the file from attaching to Obsidian. Remove that character and the file can be imported correctly. That’s why my workaround above works, 'cuz it sidesteps creation of that weird character that was recently introduced by Apple.

My workaround (from above): I tweaked (in terminal) my screenshots so they default to jpg instead of PNG; I also tweaked MacOS preferences to use military time instead of U.S AM/PM. So, basically changed the default screenshot format to get rid of the ‘PM’. Problems go away.

1 Like

I renamed the screenshot image, it pasted without any issues