edluffy / hologram.nvim

👻 A cross platform terminal image viewer for Neovim. Extensible and fast, written in Lua and C. Works on macOS and Linux.
MIT License
1.28k stars 31 forks source link

Resize Image Displayed from Markdown Tag? #30

Open erwin opened 1 year ago

erwin commented 1 year ago

Is there a way to set image dimensions in markdown img tags rendered by hologram?

For example, Discourse uses:

![image|298x130](upload://pT8t57buMgl0GD6NIjot77Ui8Sh.png) 
![image|298x130,50%](upload://pT8t57buMgl0GD6NIjot77Ui8Sh.png) 

Some other markdown flavors use:

![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)

![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png =250x250)

On Github and Gitlab you can use:

[<img src="image.png" width="250"/>](image.png)

I often prefer to include very large images if possible with my notes, so that if printed it would still look correct, and also to keep notes "future proof" as much as possible...

So would be fantastic if we could specify a size directly in the markdown img tag.