Vue core image upload is a lightweight Vue.js upload plugin that supports image upload, cropping, and compression. It also supports image processing on the mobile side, defines several load cycles, and you can control the process freely.
vue image crop upload, vue image cropper, vue crop image before upload, vue advanced cropper example, vue image upload, vuetify image cropper
[jQuery] Add Image Cropper With Upload to Your Web Application
How to make use of it:
Install & Download:
npm i vue-core-image-upload --save
Usage
<vue-core-image-upload :class="['btn', 'btn-primary']" :crop="false" @imageuploaded="imageuploaded" :data="data" :max-file-size="5242880" url="your server url" > </vue-core-image-upload>
import VueCoreImageUpload from 'vue-core-image-upload'; new Vue({ el: '#app', components: { 'vue-core-image-upload': VueCoreImageUpload }, data: { src: ' ', }, methods: { imageuploaded(res) { if (res.errcode == 0) { this.src = ' '; } } }
Props
Props | Data Type | Example | Details |
---|---|---|---|
url | String | ‘/crop.php’ | Your server API |
text | String | ‘Upload Image’ | The text of your uploading button |
inputOfFile | String | ‘file’ | Your input[file] name |
extensions | String | ‘png,jpg,gif’ | Limit the image type |
crop | Boolean | ‘server’ | Crop image option |
cropRatio | String | ‘1:1’ | The cropped image shape |
cropBtn | Object | {ok:’Save’,’cancel’:’Give Up’} | The Text cropping button text |
maxFileSize | Number | 10485760(10M) | Limit the size of the file |
maxFileSize | Number | 10485760(10M) | Limit the size of the file |
multipleSize | Number | 5 | Limit the count of the file |
maxWidth | Number | 150 | The maximum width of the cropped image |
maxheight | Number | 150 | 限制图片的最大高度 |
inputAccept | string | ‘image/*’ / ‘image/jpg,image/jpeg,image/png’ | the input[file] accept |
compress | Number | 50 | Set the quality of the compressed image |
isXhr | Boolean | true | IF cancel ajax uploading |
headers | Object | {auth: xxxxx} | Set customed header when ajax uploading |
data | Object | {auth: xxxxx} | Set customed data when ajax posting server |
vue plugin for image to crop and upload, vue core image upload library Github, vue avatar cropper, vue image resize
See Demo And Download
Official Website(Vanthink-UED): Click Here
This superior jQuery/javascript plugin is developed by Vanthink-UED. For extra Advanced usage, please go to the official website.