minimg

Browser client image scale down.

npm install minimg
28 downloads in the last month

minimg

Scale your images in browser before upload.

<input id="image" type="file" accept="image/*" capture="camera" />
<script src="minimg.js"></script>
<script>
  document.getElementById('image').onchange = function() {
    minimg(this, 600, 400, function(canvas) {
      console.log(canvas.toDataURL('image/jpeg'));
    });
  };
</script>
npm loves you