ozntel / oz-image-in-editor-obsidian

This Obsidian plugin to view Images, Transclusions, iFrames and PDF Files within the Editor without a necessity to switch to Preview.
339 stars 13 forks source link

[BUG] Dimensions 'alt' doesn't affect non-local images in preview mode #63

Closed omerdn1 closed 3 years ago

omerdn1 commented 3 years ago

Hello,

Images in preview mode don't show up with custom dimensions. ![100x100](some image) - will show up with proper dimensions in edit mode but wouldn't take effect in preview mode.

Edit:

Screen Shot 2021-09-02 at 17 16 43

Preview:

Screen Shot 2021-09-02 at 17 17 06

I don't know if this is an intended behavior but I assumed it isn't since it kind of breaks consistency between views.

Love your plugin!

omerdn1 commented 3 years ago

UPDATE: I just checked this feature with a local image and the resizing works on preview mode. So it seems like the bug only happens for non-local (URL) images.

ozntel commented 3 years ago

It is not scope of this plugin since it only manipulates the editor view. You need to report it to Obsidian, specifically to Licat.

omerdn1 commented 3 years ago

@ozntel What's odd then is that local images do get affected. Is this done by Obsidian or your plugin? If it's your plugin, shouldn't it be easy to implement the same mechanism for URL images?

ozntel commented 3 years ago

I don't handle anything in the preview mode. Obviously I included additional function to resize the images from internet and Obsidian didn't. I don't have a control over preview. The event handlers are totally different for preview and editor.