<img> HTML tag doesn't work

Steps to reproduce

Using the name of an image in the vault, enter

![](image.png)  
<img src="image.png">

Expected result

Both the markdown and the HTML should render the same image

Actual result

The markdown can find the image, but the HTML cannot - it just shows the little ‘missing image’ icon

Environment

  • Operating system: Windows 10
  • Obsidian version: v0.8.12

Additional information

3 Likes

Not a bug. We don’t support this.

Can we move this over to feature requests then? Most other html seems to work as expected, so this seems like a strange omission

It’s not a strange omission. It’s an electron security policy. I think there is already a feature request to access based on file://.
We have also proposed some work on electron to ease the overall issue of accessing a local file without compromising security.

4 Likes

Ok, but how can one set image’s size in your program without using <img>?
[upd] Oh, I found in your docs, thanks:
![Engelbart|100](https://history-computer.com/ModernComputer/Basis/images/Engelbart.jpg)

1 Like

Thank you for the clarification.

I found this because I attempted to use an “img” tag so I could add a border to an image (screenshot without a border blends into the background and is thus hard to see);

Is there any alternative way to do that?

(ideas: add a custom css class somehow??)

Thanks for sharing the way to add sizes to images.