sissilab / obsidian-image-toolkit

An Obsidian plugin for viewing an image.
MIT License
312 stars 23 forks source link

Add the ability to view an image labeled as a link without displaying it #131

Open TonyAtlas opened 1 week ago

TonyAtlas commented 1 week ago

Often there is no picture displayed in a note, but just a link to it. The picture is shown only when you hover over the link. In this mode the picture is not opened by the plugin.

I need this function every day dozens of times. For its sake I have to use the Hover editor plugin. But it is not so convenient and fast.

sissilab commented 1 week ago

Hi, what is the editing mode of your note, e.g. reading, source mode, or live preview? Normally, when your note can display images in reading or live preview mode, not just a link like ![[image.jpg]] in source mode, you can click and preview the image via this plugin. So, I guess that your note is in source mode? If this so, you can try to switch to reading or live preview mode.

TonyAtlas commented 1 week ago

The picture cannot be opened through the plugin in both read and edit mode.

I attached a video where I tried to show what I mean. First I open the image with the plugin and everything works fine there. But then there is an example with a picture as a link, which is not displayed as a picture, but just as a link. When I hover over it, it is displayed with Obsidian itself, but I can't open it with the plugin (as in the beginning of the video).

I try to do it in edit mode and in view mode. In both cases I can't open the image with the plugin.

https://github.com/user-attachments/assets/63c24ffe-9b74-4c0a-a8ae-19bc1bedd308

sissilab commented 6 days ago

Pic_20241120_103540.mp4

The cause may be that the image 'CPU and memory' does not start with an exclamation mark. Normally, we use ![[image.jpg]] to display an image, while this format [[image.jpg]] is simply a file link. So try to add an exclamation mark before that.

TonyAtlas commented 6 days ago

Pic_20241120_103540.mp4

The cause may be that the image 'CPU and memory' does not start with an exclamation mark. Normally, we use ![[image.jpg]] to display an image, while this format [[image.jpg]] is simply a file link. So try to add an exclamation mark before that.

In my usage scenario, I often purposely remove the “!” in front of a picture so that it doesn't show up until I hover over it.

I often have to write condensed text with lots of pictures. In order to keep the note visually concise, I remove the default display of pictures, leaving the option to quickly display the picture I want when hovering over a link to it. That is, you get a sentence that has words that are links to pictures. Of course, the link and the word are related in meaning.

The point is that such links often give me additional context, which I usually remember, but from time to time I can forget something somewhere and hovering over a picture helps to quickly refresh my memory.

In my case, if all the pictures are displayed at once (i.e. I put a “!” in front of them), the note will be visually cluttered, cumbersome and it will be difficult to quickly read the overall gist of the note. Often I may have 4-7 links per sentence that are pictures.

When reading such notes, when the picture pops up when you hover over the link, it often happens that its size is too small. That's where your plugin would help me. I could open the pop-up picture through it and enlarge it to the desired size.

Also in such notes it is often necessary to quickly open several such pictures, adjust their size and put them next to each other. Here your plugin could also help a lot.

In general, I have long been in need of this functionality almost every day. If there is a technical possibility to realize this, it would really help me with my work. Thank you for your attention and desire to understand the problem. 🙏