mvdkwast / obsidian-copy-as-html

Obsidian plugin: copy document as HTML, including images
MIT License
42 stars 11 forks source link

Resize images #16

Closed lyso closed 9 months ago

lyso commented 1 year ago

Is your feature request related to a problem? Please describe. When copy HTML of a note with images, it can convert the image into base64 inside the HTML. This is a great feature! Thanks so much.

But the images are in their raw file image sizes in the output HTML. For example, a png file of size 1920*1080, and in the note it was set display width as 400 (![[image/path.png|400]]). In the copied HTML, it is still 1920 wide not 400.

Describe the solution you'd like If it is possible to have the image resized according to the MD setting? like ![[image/path.png|400]] ?

Describe alternatives you've considered na

Additional context na

mvdkwast commented 1 year ago

Hi @lyso,

I wasn't aware that this was even possible in Obsidian. Very good suggestion indeed, that would give a lot more control over the resulting size of the base64.

I will look into this.

mvdkwast commented 9 months ago

This seems to be fixed by the updates to the internal Obsidian markdown renderer.

Feel free to reopen if you can still reproduce the issue.