What I’m trying to do
I’m trying to make every different images have wished height so i don’t have to resize it each time
Things I have tried
I tried formatting from this topic but it only tells how to change width independently
I’m trying to make every different images have wished height so i don’t have to resize it each time
I tried formatting from this topic but it only tells how to change width independently
Try instead:
<img src="your-image.png" height="100">
Full syntax would be:
<img src="your-image.png" width="200" height="100">
but i do really need obsidian md syntax so i can just drag and drop img to a note
Well, there is none. Take it or leave it.
Markdown itself doesn’t even provide any syntax for specifying image dimensions. So this feature provided by Obsidian is already an extension.
Don’t use CSS snippets, but could the link below help?
Expanding on the snippet in the linked topic, you can add a CSS class so it only affects images in one note, not all images across your vault.
.img-200h .image-embed.image-embed img:not([width]) {
max-height: 200px;
max-width: 300px;
}
and add img-200h
in the cssclasses
Property. img-200h
can be changed to mostly anything as long as there isn’t a class with the same name in use.