Boostnote: [Feature Request] Resize an image with a single value/parameter and maintain width/height ratio

Created on 3 Apr 2019  路  1Comment  路  Source: BoostIO/Boostnote

Current behavior

I see that image resizing has been implemented here: this issue. Currently it seems that you must specify both image dimensions: width x height as seen below:
![2b5a9eda.png](:storage/7abc5357-46c8-4fe2-a18d-658427191360/2b5a9eda.png =400x450)

Expected behavior

We should be able to resize images using either a single number (probably corresponding to width) and have the height autoscale to maintain the original images width/height ratio. An example would look like this:
![2b5a9eda.png](:storage/7abc5357-46c8-4fe2-a18d-658427191360/2b5a9eda.png =400)

Alternatively

You could provide a numeric multiplier and have it resize based on that, such as 2 for 2x bigger, 0.5 for half the size etc. Example:
![2b5a9eda.png](:storage/7abc5357-46c8-4fe2-a18d-658427191360/2b5a9eda.png =0.75x)

Current resizing should still work

If two numbers are separated by an x, as in the current syntax for resizing images ![2b5a9eda.png](:storage/7abc5357-46c8-4fe2-a18d-658427191360/2b5a9eda.png =<number>x<number>), the current resize functionality should continue to work as intended.

Steps to reproduce

Try resizing an image in Boostnote! =)

Environment

  • Version : Version 0.11.15 (0.11.15)
  • OS Version and name : MacOS High Sierra 10.13.4 (17E199)

Most helpful comment

On digging deeper, I found this discussion which outlines that single dimension specification is in fact implemented already. I just couldn't find it anywhere in the documentation either for boostnote or the markdown-it-imsize npm module that implemented image resizing for markdown projects like Boostnote. The proper syntax is as follows:

To specify an image size by width (auto scaling height)

[image.png](:storage\path\to\image.png =300x)

To specify an image size by height (auto scaling width)

[image.png](:storage\path\to\image.png =x300)

Thanks! I will close this issue.

>All comments

On digging deeper, I found this discussion which outlines that single dimension specification is in fact implemented already. I just couldn't find it anywhere in the documentation either for boostnote or the markdown-it-imsize npm module that implemented image resizing for markdown projects like Boostnote. The proper syntax is as follows:

To specify an image size by width (auto scaling height)

[image.png](:storage\path\to\image.png =300x)

To specify an image size by height (auto scaling width)

[image.png](:storage\path\to\image.png =x300)

Thanks! I will close this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rokt33r picture Rokt33r  路  3Comments

aurelkurtula picture aurelkurtula  路  3Comments

NourEldin275 picture NourEldin275  路  3Comments

DanielRamosAcosta picture DanielRamosAcosta  路  3Comments

lijinglue picture lijinglue  路  3Comments