How can I change the size of images?

I tried using “<img src={local img path} >” and failed.

2 Likes

The standard markdown syntax for inserting an image is:

![Image Alt Text](path/to/image.jpg)

Note the exclamation mark at the beginning.

Obsidian also has allows us to use a ‘WikiLinks’-style shortcut, which is just:

![[image.jpg]]

When using the standard markdown syntax - or straight HTML like in your example - you have to URL-encode any non-allowed characters. That means, for example, that if you have a file named “my image.jpg”, the space in its name is going to cause problems, and you need to escape it, like this:

![Image Alt Text](path/to/my%20image.jpg)

Images are usually displayed at their original size, or follow whatever the current CSS styles are for images in your Obsidian theme. MultiMarkdown - and extension to standard markdown - does allow us to add extra attributes to image and link elements, but I’m not certain Obsidian supports this yet.

Thanks for your reply! I find that ![img](Pasted%20image.png) can show the image but <img src=“Pasted%20image.png” > can not. If I can use <img> to show images, I can use <img src=“Pasted%20image.png” width="50%" > to change the size of images.

Interesting - it might be worthwhile reporting your inability to use the <img> tag as you described as a bug (seems like it should work!).

Might also be worthwhile to post a feature request for Obsidian to “support MultiMarkdown’s extended link and image attributes” - which I believe would have solved your problem of resizing the images.

I think so. Thanks for your reply again!

the way to do it now is

![Engelbart|100](https://history-computer.com/ModernComputer/Basis/images/Engelbart.jpg)

on the wiki here

3 Likes

Also, if you want to resize it without a caption / name, you can use ![|100] as the prefix.

If you’re showing the image in a table, you’ll need to adjust that to ![|100] to get it to render properly (you’re telling the table processor to use the pipe symbol as a literal symbol, not as a cell divider in the table).