title: setCropBoxData react-cropper not Working when initializing image
body: <p>I have an orignal Image which I am passing as src of a cropper. Now I am trying to set the adjusted image width and height when the cropper modal is open but somehow it does not set the initial width and height of the already existing image. Can anyone tell me what wrong I am doing?</p>
  <pre><code>  &lt;Cropper
        style={{ height: 390, width: '100%' }}
        aspectRatio={16 / 9}
        guides={false}
        src={&quot;https://tappio-development.s3.eu-central-1.amazonaws.com/user/1648980920749-tour-2-3.jpg&quot;}
        //   ref={(cropper) =&gt; {
        //     this.cropper = cropper;
        //   }}
        viewMode={1}
        dragMode=&quot;move&quot;
        cropBoxMovable={false}
        zoomTo={zoom}
        responsive={true}
        onInitialized={(instance) =&gt; {
          const img = new Image();
          img.src = `https://tappio-development.s3.eu-central-1.amazonaws.com/user/1648980934596-tour-2-3.jpg`;
  
          img.onload = () =&gt; {
             //trying to load already width and height from already existing image
            instance.setCropBoxData({
              x: img.width,
              y: img.height,
              width: img.width,
              height: img.height,
            });
            //setting to use cropper instance
            setCropper(instance);
          };
        }}
      /&gt;
  </code></pre>