xRyul / obsidian-image-converter

⚡️ Convert and compress images from one format to another by drag'n'dropping or pasting files into the note.
MIT License
111 stars 11 forks source link

[FEATURE REQUEST]: Make resize persistent in Reading Mode; Show right-click-context-menu on external images. #18

Open notuntoward opened 7 months ago

notuntoward commented 7 months ago

I just installed this plugin, and finally, it looked like Obsidian has a simple way to resize images. But at least on my Windows machine, I have some problems with it.

  1. I can resize with mouse drags, but the resizing doesn't persist. If I leave the page with the resized image on it and then return, the image is back to its original size
  2. The right click menu doesn't appear when I right click.

My settings are below. Any advice?

image
xRyul commented 7 months ago

hey, thanks for testing out the plugin.

  1. Are you in Source mode, Live Preview, Reading mode? Resizing with mouse-drag will not persist in Reading mode, as it simply updates the number in the link. e.g. ![[image.jpg|imagesize]]

  2. What links do you use on your images? ![]() or ![[]]? Right-click should work on internal images. If image is under 100px it won't let you right-click. If you have upgraded from previous release, it might help deleting the plugin and installing it again.

notuntoward commented 7 months ago

I was in Viewing Mode, but now I see that when I put it into live edit mode, the resize does persist. Thanks!

To avoid confusing people like me, you could prevent apparent resizing in reading mode.

The right click menu pops up sometimes in edit mode but mostly not. When it does pop up, I don't see a change in image size after I type in a new size and click the submit button.

xRyul commented 7 months ago

To avoid confusing people like me, you could prevent apparent resizing in reading mode.

It was left by design, sometimes I use it myself as a zoom alternative. Although, gonna add a toggle which would allow user to enable or disable it from Reading Mode.

The right click menu pops up sometimes in edit mode but mostly not.

...I don't see a change in image size after I type in a new size and click the submit button.

Plugin is able to fetch original image path and resize it, but Obsidian simply struggles to update its HTML img.src . If you switch to another note and then back, it will update.

Basically, if anything was done to the image in the quick succession prior to right-click, Obsidian doesn't have time to update the image link, hence right-click-resize also fails to auto-update. But nevertheless, since implementing this feature, I have found better way of dealing with images, and gonna add it to my to-do list. Although, can't promise when it would be released.

notuntoward commented 7 months ago

Oops, I forgot to answer the whole question.

What links do you use on your images? or ![[]]?

I use both ![[]] and ![]()

Do you use any custom theme which changes the behaviour of how images are depicted in the notes? E.g. Minimal theme?

Yes, I'm using Gitsidian now.

Do you use any other plugins which change image behaviour in Obsidian?

Not that I know of.