Gathering detailed insights and metrics for vue-picture-input-kxtreme
Gathering detailed insights and metrics for vue-picture-input-kxtreme
npm install vue-picture-input-kxtreme
Typescript
Module System
Node Version
NPM Version
67.7
Supply Chain
99.2
Quality
75.2
Maintenance
100
Vulnerability
100
License
Vue (96.5%)
JavaScript (3.5%)
Total Downloads
1,075
Last Day
1
Last Week
7
Last Month
10
Last Year
91
887 Stars
300 Commits
156 Forks
21 Watching
4 Branches
21 Contributors
Minified
Minified + Gzipped
Latest Version
2.1.7
Package Id
vue-picture-input-kxtreme@2.1.7
Unpacked Size
164.13 kB
Size
46.99 kB
File Count
9
NPM Version
5.5.1
Node Version
9.2.1
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
7
Compared to previous week
Last month
42.9%
10
Compared to previous month
Last year
-14.2%
91
Compared to previous year
Mobile-friendly picture file input Vue.js component with image preview, drag and drop, EXIF orientation, and more.
1npm install --save vue-picture-input
1yarn add vue-picture-input
1<template> 2 <div class="hello"> 3 <picture-input 4 ref="pictureInput" 5 @change="onChange" 6 width="600" 7 height="600" 8 margin="16" 9 accept="image/jpeg,image/png" 10 size="10" 11 buttonClass="btn" 12 :customStrings="{ 13 upload: '<h1>Bummer!</h1>', 14 drag: 'Drag a 😺 GIF or GTFO' 15 }"> 16 </picture-input> 17 </div> 18</template>
1<script> 2import PictureInput from 'vue-picture-input' 3 4export default { 5 name: 'app', 6 data () { 7 return { 8 } 9 }, 10 components: { 11 PictureInput 12 }, 13 methods: { 14 onChange (image) { 15 console.log('New picture selected!') 16 if (image) { 17 console.log('Picture loaded.') 18 this.image = image 19 } else { 20 console.log('FileReader API not supported: use the <form>, Luke!') 21 } 22 } 23 } 24} 25</script>
You can also use it directly in the browser through unpkg's CDN (or jsDelivr):
1<!DOCTYPE html> 2<html> 3<head> 4 <script src="https://unpkg.com/vue"></script> 5 <script src="https://unpkg.com/vue-picture-input"></script> 6 <title>In the browser!</title> 7</head> 8<body> 9 <div id="app"> 10 <p>{{ message }}</p> 11 <picture-input></picture-input> 12 </div> 13 <script> 14 var app = new Vue({ 15 el: '#app', 16 data: { 17 message: 'Hello Vue!' 18 }, 19 components: { 20 'picture-input': PictureInput 21 } 22 }) 23 </script> 24</body> 25</html>
Try it on CodeSandbox: https://codesandbox.io/s/github/alessiomaffeis/vue-picture-input-example
fileName: (string, optional) the file name
fileType: (string, optional) the file type of the image, i.e. "png", or
mediaType: (string, optional) the media type of the image, i.e. "image/png"
1{ 2 upload: '<p>Your device does not support file uploading.</p>', // HTML allowed 3 drag: 'Drag an image or <br>click here to select a file', // HTML allowed 4 tap: 'Tap here to select a photo <br>from your gallery', // HTML allowed 5 change: 'Change Photo', // Text only 6 remove: 'Remove Photo', // Text only 7 select: 'Select a Photo', // Text only 8 selected: '<p>Photo successfully selected!</p>', // HTML allowed 9 fileSize: 'The file size exceeds the limit', // Text only 10 fileType: 'This file type is not supported.', // Text only 11 aspect: 'Landscape/Portrait' // Text only 12}
All contributions are welcome, as long as they are within the scope of the project. Please open a new issue before submitting a pull request.
You should follow the Javascript Standard Style guidelines: https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/12 approved changesets -- score normalized to 0
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
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
37 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-03
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