kartoteket / vue-image-upload-resize

A simple vue-component for client-side image upload with resizing
MIT License
175 stars 54 forks source link

maxWidth / maxHeight scales and deforms image width smaller dimensions #68

Open satyavh opened 3 years ago

satyavh commented 3 years ago

From the docs:

maxWidth / maxHeight An integer in pixels for the maximum width allowed for uploaded images, selected images with a greater width than this value will be scaled down.

For images smaller than maxWidth/maxHeight, it means scaling up reducing the quality. Example:

:maxHeight="100"

results in scaling up

ImageUploader: original image size = 98 X 28
ImageUploader: scaled image size = 350 X 100

Expected behavior: do not scale the image if image size is smaller than maxWidth/maxHeight