_resizeImage() {
    let width, height;

    if (this.options.shapeProperties.useImageSize === false) {
      // Use the size property
      let ratio_width = 1;
      let ratio_height = 1;

      // Only calculate the proper ratio if both width and height not zero
      if (this.imageObj.width && this.imageObj.height) {
        if (this.imageObj.width > this.imageObj.height) {
          ratio_width = this.imageObj.width / this.imageObj.height;
        } else {
          ratio_height = this.imageObj.height / this.imageObj.width;
        }
      }

      width = this.options.size * 2 * ratio_width;
      height = this.options.size * 2 * ratio_height;
    } else {
      // Use the image size with image padding
      const imgPadding = this._getImagePadding();
      width = this.imageObj.width + imgPadding.left + imgPadding.right;
      height = this.imageObj.height + imgPadding.top + imgPadding.bottom;
    }

    this.width = width;
    this.height = height;
    this.radius = 0.5 * this.width;
  }
Adjust the node dimensions for a loaded image.

Pre: this.imageObj is valid