Resize images vertically

Hi, this is my first post in this forum. I checked for possible duplicates and considered opening a new feature request for valid. Feel free to correct me if i have to do things differently :sweat_smile:

Use case or problem

For my use case i would like to resize an image by setting only a fixed height.
In my opinion, this is at least as important as resizing by width, because the vertical space of a document defines how much you can read until you have to scroll/turn pages.

An implementation of this feature would enable me to easily resize images with different aspect ratios to take up the same vertical space.

Proposed solution

My proposal for this would be:

[[image.png|x200]]

β†’ fixed height, width scales to retain the aspect ratio

Current workaround

Currently there are two resize options implemented (Docs: Embed files )

  • ![[image.png|100x100]] (fixed height and width)
  • ![[image.png|100]] (fixed width)

This Works also for linked images.

Both options are not to my satisfaction. The first one distorts the image if i do not calculate the scaled image by aspect ratios. The second one also requires calculation to do for every image embedded.

I would really like to hear your opinions on this topic :blush:

Annotations

It’s a bit unrelated but i would also like to have the option to center a resized image
horizontally

7 Likes

I’d like to resize an image by dragging a corner point, ideally. Similar to Adobe applications. In edit mode by clicking on an image perhaps it can show corner points for resizing and in preview mode it can hide them.

4 Likes

This is what we really need, instead of having to fiddle with a numerical value until we find the desired view size. Evernote does a great job of letting you non-destructively resize an image while preserving aspect ratio by just grabbing a corner using your mouse.

1 Like

Exactly the same ask and syntax suggested is intuitive. It is exactly he option I tried when checking if it could be done.

[[image.png|x200]]

I agree that a syntax is needed to specify width or height, or maybe even both. The xW could be a special case of [[image.png|WxH]], so the default is backward-compatibility with |W, |xH specifies height only with aspect ratio kept, and |WxH lets aspect ratio be discarded.