Vue Image Compressor

Vue Image Compressor

A Vue component to compress image files on client side.

Vue Image Compressor

Vue Component To Compress Image Files. It's based on cpol-image and others references



You can import vue-image-compressor.vue to your vue component file like this and process it with your preprocessor.

You can install it via NPM

npm install vue-image-compressor

Or Just put it after Vue JS~

<script src=""></script>
<script src="./dist/vue-image-compressor.js"></script>

Import Module

import imageCompressor from 'vue-image-compressor'
// Or
var imageCompressor = require('vue-image-compressor');






  import imageCompressor from 'vue-image-compressor';

  export default {

    components: { imageCompressor },

    methods: {



done (Function)

Callback after Compress the image. It will pass original file and compressed file and also the canvas element. The object pretty complete with blob and base64 and other needed information.

scale (Number)

The percentage of image scaling it starts from 1 to 100.

quality (Number)

The percentage of image quality it starts from 1 to 100.


Thank You for Making this useful~

Let's talk about some projects with me

Just Contact Me At:


MIT Copyright (c) 2016 - forever Naufal Rabbani

Github Repository

Tags: #VueJs