Fork me on GitHub

A Lightweight Plugin For Image To Upload and Crop

Get Started

upload

Click button to upload your image


$(".js-btn-upload").coreImageUpload ({
    url: "./upload.php",
    inputOfFile: 'image',
    uploadedCallback: function (result) {
        alert(result);
    }
});
                

Crop Image

Crop Image

Click button to crop your image


<script src="../src/jquery-ui.min.js"></script>
//...
$(".js-btn-crop").coreImageUpload ({
    url: "./crop.php",
    inputOfFile: 'image',
    enableCrop: true,
    cropRatio: '1:1',
    uploadedCallback: function (result) {
        alert(result);
    }
});
                

if you want to crop image ,you should incluejquery.core.image.min.css and jquery-ui.And it will send to server with the crop arguments

DOWNLOAD AND DOCUMENT

All Rights Reserved By Vanthink-UED