Hacker
Hacker

Reputation: 7906

Image upload and display resized image in angularjs

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.

Upvotes: 0

Views: 1700

Answers (1)

Enver Dzhaparoff
Enver Dzhaparoff

Reputation: 4421

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/

Upvotes: 1

Related Questions