Why images are rotated if we resize width using dropzone

28 Views Asked by At

I have a simple script to upload images using dropzone v5 , but when I use the option "resizeWidth", the images are uploaded but with rotation especially the photos taken by mobile phone I guess. How we can prenvent that ?

        Dropzone.autoDiscover = false;
    var myDropzone = new Dropzone("div#myDrop",
        {
            paramName: "files",
            addRemoveLinks: true,
            uploadMultiple: true,
            autoProcessQueue: false,
            parallelUploads: 50,
            maxFilesize: 100, // MB
            acceptedFiles: ".png, .jpeg, .jpg, .gif",
            resizeWidth: 1000,
            resizeQuality: 0.8,
            url: "{{ path('property_upload_photos', {'token': property.token}) }}",
        });

    $("#add_file").on("click",function (){
        myDropzone.processQueue();
    });
0

There are 0 best solutions below