Gathering detailed insights and metrics for vue-image-crop-upload
Gathering detailed insights and metrics for vue-image-crop-upload
Gathering detailed insights and metrics for vue-image-crop-upload
Gathering detailed insights and metrics for vue-image-crop-upload
vue-core-image-upload
a vue plgin for image upload and crop
@upload-io/vue-uploader
Vue File Upload UI Widget — Lightweight & supports: drag and drop, multiple uploads, image cropping, customization & more 🚀 Comes with Cloud Storage 🌐
imgpond
Image uploading one-stop solution.
vue-crop-upload
VueCropUpload is a Vue 3 component that provides image uploading functionality with built-in cropping capabilities. It allows users to select an image file, crop it, and upload it to a specified URL.
A beautiful vue component for image cropping and uploading. (vue图片剪裁上传组件)
npm install vue-image-crop-upload
Typescript
Module System
Node Version
NPM Version
JavaScript (93.55%)
Vue (4.72%)
CSS (0.95%)
SCSS (0.5%)
HTML (0.27%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
2,098 Stars
181 Commits
366 Forks
38 Watchers
16 Branches
36 Contributors
Updated on Jul 04, 2025
Latest Version
3.0.3
Package Id
vue-image-crop-upload@3.0.3
Unpacked Size
2.65 MB
Size
772.66 kB
File Count
29
NPM Version
7.5.4
Node Version
11.5.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
37
A beautiful vue component for image crop and upload.
Notice: This component is designed for pc, not recommended for use on the mobile side.
IE10+
1$ npm install vue-image-crop-upload
Name | Type | Default | Description |
---|---|---|---|
url | String | '' | Server api path,like "/avatar/upload", If empty, will not be uploaded |
method | String | 'POST' | request http method |
field | String | 'upload' | Upload input filename, used for server side get the file stream. |
value | Boolean | twoWay | show or not |
params | Object | null | POST Params,like "{k:v}" |
headers | Object | null | POST request header,like "{k:v}" |
langType | String | 'zh' | language type |
langExt | Object | language extend | |
width | Number | 200 | width of receive image |
height | Number | 200 | height of receive image |
imgFormat | string | 'png' | jpg/png, Server api receive file type. |
imgBgc | string | '#fff' | background color, if the imgFormat prop is jpg |
noCircle | Boolean | false | disable circle preview |
noSquare | Boolean | false | disable square preview |
noRotate | Boolean | true | disable rotate function |
withCredentials | Boolean | false | support cross-domain |
Name | Description |
---|---|
srcFileSet | Once you've selected the file, params( fileName, fileType, fileSize ) |
cropSuccess | image crop success, params( imageDataUrl, field ) |
cropUploadSuccess | upload success, params( jsonData, field ) |
cropUploadFail | upload fail, params( status, field ) |
1{ 2 hint: 'Click or drag the file here to upload', 3 loading: 'Uploading…', 4 noSupported: 'Browser is not supported, please use IE10+ or other browsers', 5 success: 'Upload success', 6 fail: 'Upload failed', 7 preview: 'Preview', 8 btn: { 9 off: 'Cancel', 10 close: 'Close', 11 back: 'Back', 12 save: 'Save' 13 }, 14 error: { 15 onlyImg: 'Image only', 16 outOfSize: 'Image exceeds size limit: ', 17 lowestPx: 'Image\'s size is too low. Expected at least: ' 18 } 19}
1<div id="app"> 2 <a class="btn" @click="toggleShow">set avatar</a> 3 <my-upload field="img" 4 @crop-success="cropSuccess" 5 @crop-upload-success="cropUploadSuccess" 6 @crop-upload-fail="cropUploadFail" 7 v-model="show" 8 :width="300" 9 :height="300" 10 url="/upload" 11 :params="params" 12 :headers="headers" 13 img-format="png"></my-upload> 14 <img :src="imgDataUrl"> 15</div> 16 17<script> 18 import 'babel-polyfill'; // es6 shim 19 import Vue from 'vue'; 20 import myUpload from 'vue-image-crop-upload'; 21 22 new Vue({ 23 el: '#app', 24 data: { 25 show: true, 26 params: { 27 token: '123456798', 28 name: 'avatar' 29 }, 30 headers: { 31 smail: '*_~' 32 }, 33 imgDataUrl: '' // the datebase64 url of created image 34 }, 35 components: { 36 'my-upload': myUpload 37 }, 38 methods: { 39 toggleShow() { 40 this.show = !this.show; 41 }, 42 /** 43 * crop success 44 * 45 * [param] imgDataUrl 46 * [param] field 47 */ 48 cropSuccess(imgDataUrl, field){ 49 console.log('-------- crop success --------'); 50 this.imgDataUrl = imgDataUrl; 51 }, 52 /** 53 * upload success 54 * 55 * [param] jsonData server api return data, already json encode 56 * [param] field 57 */ 58 cropUploadSuccess(jsonData, field){ 59 console.log('-------- upload success --------'); 60 console.log(jsonData); 61 console.log('field: ' + field); 62 }, 63 /** 64 * upload fail 65 * 66 * [param] status server api return error status, like 500 67 * [param] field 68 */ 69 cropUploadFail(status, field){ 70 console.log('-------- upload fail --------'); 71 console.log(status); 72 console.log('field: ' + field); 73 } 74 } 75 }); 76</script>
1<div id="app"> 2 <a class="btn" @click="toggleShow">set avatar</a> 3 <my-upload field="img" 4 @crop-success="cropSuccess" 5 @crop-upload-success="cropUploadSuccess" 6 @crop-upload-fail="cropUploadFail" 7 v-model="show" 8 :width="300" 9 :height="300" 10 url="/upload" 11 :params="params" 12 :headers="headers" 13 img-format="png"></my-upload> 14 <img :src="imgDataUrl"> 15</div> 16 17<script> 18 import 'babel-polyfill'; // es6 shim 19 import Vue from 'vue'; 20 import myUpload from 'vue-image-crop-upload/upload-2.vue'; 21 22 new Vue({ 23 el: '#app', 24 data: { 25 show: true, 26 params: { 27 token: '123456798', 28 name: 'avatar' 29 }, 30 headers: { 31 smail: '*_~' 32 }, 33 imgDataUrl: '' // the datebase64 url of created image 34 }, 35 components: { 36 'my-upload': myUpload 37 }, 38 methods: { 39 toggleShow() { 40 this.show = !this.show; 41 }, 42 /** 43 * crop success 44 * 45 * [param] imgDataUrl 46 * [param] field 47 */ 48 cropSuccess(imgDataUrl, field){ 49 console.log('-------- crop success --------'); 50 this.imgDataUrl = imgDataUrl; 51 }, 52 /** 53 * upload success 54 * 55 * [param] jsonData server api return data, already json encode 56 * [param] field 57 */ 58 cropUploadSuccess(jsonData, field){ 59 console.log('-------- upload success --------'); 60 console.log(jsonData); 61 console.log('field: ' + field); 62 }, 63 /** 64 * upload fail 65 * 66 * [param] status server api return error status, like 500 67 * [param] field 68 */ 69 cropUploadFail(status, field){ 70 console.log('-------- upload fail --------'); 71 console.log(status); 72 console.log('field: ' + field); 73 } 74 } 75 }); 76</script>
1<div id="app"> 2 <a class="btn" @click="toggleShow">set avatar</a> 3 <my-upload field="img" 4 :width="300" 5 :height="300" 6 url="/upload" 7 :params="params" 8 :headers="headers" 9 lang-type="en" 10 :value.sync="show" 11 img-format="png"></my-upload> 12 <img :src="imgDataUrl"> 13</div> 14 15<script> 16 import 'babel-polyfill'; // es6 shim 17 import Vue from 'vue'; 18 import myUpload from 'vue-image-crop-upload/upload-1.vue'; 19 20 new Vue({ 21 el: '#app', 22 data: { 23 show: true, 24 params: { 25 token: '123456798', 26 name: 'avatar' 27 }, 28 headers: { 29 smail: '*_~' 30 }, 31 imgDataUrl: '' // the datebase64 url of created image 32 }, 33 components: { 34 'my-upload': myUpload 35 }, 36 methods: { 37 toggleShow() { 38 this.show = !this.show; 39 } 40 }, 41 events: { 42 /** 43 * crop success 44 * 45 * [param] imgDataUrl 46 * [param] field 47 */ 48 cropSuccess(imgDataUrl, field){ 49 console.log('-------- crop success --------'); 50 this.imgDataUrl = imgDataUrl; 51 }, 52 /** 53 * upload success 54 * 55 * [param] jsonData server api return data, already json encode 56 * [param] field 57 */ 58 cropUploadSuccess(jsonData, field){ 59 console.log('-------- upload success --------'); 60 console.log(jsonData); 61 console.log('field: ' + field); 62 }, 63 /** 64 * upload fail 65 * 66 * [param] status server api return error status, like 500 67 * [param] field 68 */ 69 cropUploadFail(status, field){ 70 console.log('-------- upload fail --------'); 71 console.log(status); 72 console.log('field: ' + field); 73 } 74 } 75 }); 76 77</script>
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 13/21 approved changesets -- score normalized to 6
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
119 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More