Client Side Image Compression Before Upload

Thanks @JonL . This solved my problem

1 Like

Saturday coffee nights…who doesn’t love them?

Working on a cropperjs integration via custom component.

  1. Add to your img html tag the attribute is="dmx-jonl_cropper" and the src of the img you want to crop.
  2. Add some cropperjs options dragMode="move" aspectRatio="1" autoCropArea="0.5" noRestore noGuides noCenter noHighlight noCropBoxMovable noCropBoxResizable noToggleDragModeOnDblclick
<img is="dmx-jonl_cropper" id="cropper" dmx-bind:src="s3upload1.file.dataUrl" 
dragMode="move" aspectRatio="1" autoCropArea="0.5" noRestore noGuides 
noCenter noHighlight noCropBoxMovable noCropBoxResizable
noToggleDragModeOnDblclick>

Tada!

Still missing some methods and events but I ran out of coffee. And when I say coffee I mean coffee. My new hobby:

3 Likes