Vanthink-UED / vue-core-image-upload

a vue plugin for image to crop and upload
http://vanthink-ued.github.io/vue-core-image-upload/index.html
1.35k stars 207 forks source link

Crop and Resize props not working #191

Open HakanArda opened 6 years ago

HakanArda commented 6 years ago
<profile-picture-upload
        :class="['btn', 'btn--raised', 'primary', 'theme--light', 'px-3', 'mt-4']"
        crop-ratio="1:1"
        crop="true"
    resize="true"
    @imageuploaded="uploadProfilePicture"
    @errorhandle="failedUpload"
    :text="trans('home.forms.upload_picture')"
    :max-file-size="5242880"
    :headers="headers"
    :crop-btn="{ 'ok': trans('home.forms.next'), 'cancel': trans('home.forms.cancel') }"
    input-of-file="img"
    url="/api/v1/user/image/update">
</profile-picture-upload>

My component like that, i'm using both crop and resize props. However, I cannot change crop position and also selected field not cropped. Original image posted to my server.

In addition, :rotate="true" prop gives error like that;

https://ibb.co/dQb9qS

How can I fix it?

KocaHocTpa commented 6 years ago

Similar problem

RexkentZheng commented 6 years ago

I got a worse situation that you,the images that I uploaded goes to black,a total black image..... Just like this: image

cqw1022 commented 6 years ago

use old version 2.3.10; the version 2.4.x not working now。maybe is the dependent lib 'daycaca' error, version not right!

trotsaleksandrov commented 6 years ago

I am experiencing the issue with black pictures upload also. Does reverting the version worked for someone?

Actually upgrading to 2.4.5 fixed the problem with black images. Also used latest version of daycaca package. The only thing: in crop.vue daycaca.rotate2 to daycaca.rotate should be chaged