When trying to crop images with a transparent background, the viewMode used (2) will not allow cropping outside the actual image and include the transparent background. When setting viewMode to 0 this will work. See examples here: https://fengyuanchen.github.io/cropperjs/