SlRvb/Obsidian--ITS-Theme

[FR] How to resize image with caption, and keep caption centered

Closed this issue · 8 comments

Hi, thanks for the awesome job. I have one question. If I am using the S - Images Adjustments.css, when I add a caption to an image it works perfectly...
image

However, my question is if it is possible to resize the image and keep the caption aligned to middle of the image and not to the middle of the page:

image

Thanks :)

This should be fixed, but I can only affect how this works using my sizing names (wmed, wtiny, etc) since I can't really grab obsidian's 100 and the like numbers myself unfortunately.

Hi, thanks :)
Just one question, how am I supposed to write this?
image
image
A tried these 2 implementations, in both cases the size changes, but in both case the caption includes the size modifier.
Thanks for the help.

Oh sorry! It should be like this #cap#wmed, with any of the size variables in my docs.

Hi.
Am I doing something wrong? I tried the following two implementations, based on your reply. But it looks like I am not able to change the size of the image.

image
image

The results are the same in both reading and editing mode.
Also, is the character \ actually required?
Thanks :)

Ah, try and redownload the snippet again? I think I fixed the issue. And no you don't need the \ escape.

Hi, good morning.
I just tried the new snippet in and obsidian sandbox. The resizing works
image
However in reading mode, the caption is now in the center again
image
:(

Ah shoot, I think I've fixed that issue now. Could you redownload the snippet?

It worked. You are the best :)