unstretched image scaling feature request #7362
Unanswered
wb1016
asked this question in
Help / Questions
Replies: 1 comment 1 reply
-
I'm not sure I understand what you mean. Images get scaled down to available screen size by default. <!-- scaling an image to an exact size -->
![image.png](/res/image.png =1920x1080)
<!-- scaling image using relative height -->
![image.png](/res/image.png =1920x) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
currently, the wiki.js requires both width and height for image scaling. this is quite devastating because there are many devices have various DPI and resolution. if the given image scale is bigger than screen resolution, the image is displayed as stretched.(see example below)
to solve this problem, we need to fix the image aspect ratio. when given image scale is bigger than screen resolution, the image height should be scaled relative to content width. this can be achieved by giving only width to image scale factor. ffmpeg has good example. they accept format like this:
-vf scale=1920:-1
the
-1
means automatic scaling.please add this feature to wiki.js. it will be good to have.
Beta Was this translation helpful? Give feedback.
All reactions