0

I have a profile page where user saves his photos and after saving we render it on UI in particular width and height. Problem is user uploads irregular dimension images. When we try to put this on UI, it becomes distorted. What is the best possible solution for this? I can think of below.

  1. Don't allow user to upload image below some size.
  2. While uploading resize image - May distort.
  3. While displaying resize - may distort.

Please let me know in real world how is this handled.

I tried to resize using

http://ngmodules.org/modules/ng-image-resize

but still image looks distorted.

1 Answer 1

1

I suggest to use ng-file-upload module (github link)

Upload with form submit and validations: http://jsfiddle.net/danialfarid/maqbzv15/544/

Image Crop and Upload http://jsfiddle.net/xxo3sk41/1/

Sign up to request clarification or add additional context in comments.

3 Comments

- Does it help to resize or scale the image?
Yes, if image resize is supported by this browser: upload.resize(file, width, height, quality, type, ratio, centerCrop).then(function(resizedFile){...});
You can check this like so: upload.isResizeSupported()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.