Cropper js - Cropper grid issue - Help please!
Briefly

The issue with the crop grid misalignment in CropperJS is likely due to timing, where CropperJS is initialized before the image fully loads, resulting in incorrect dimensions (0x0). To resolve this, it's essential to implement an onload event for the image, initializing CropperJS only after the image is correctly loaded. This ensures that the crop zone aligns accurately with the visible image on the canvas, preventing discrepancies and weird behaviors.
To fix, you'll want to wait for the image itself to load before initializing CropperJS. Something like: const img = document.getElementById('editorImage'); img.onload = () => { new Cropper(img, { /* options */ }); };
Read at SitePoint Forums | Web Development & Design Community
[
|
]