diff --git a/api/js/etemplate/et2_widget_image.js b/api/js/etemplate/et2_widget_image.js index d27d74f38b..fd488b75e7 100644 --- a/api/js/etemplate/et2_widget_image.js +++ b/api/js/etemplate/et2_widget_image.js @@ -494,7 +494,7 @@ var et2_avatar = /** @class */ (function (_super) { self._buildEditableLayer(noPhotoExists); }).sendRequest(true); } - if (this.options.crop) { + if (this.options.crop && !this.options.readonly) { jQuery(this.image).cropper({ aspectRatio: 1 / 1, crop: function (e) { diff --git a/api/js/etemplate/et2_widget_image.ts b/api/js/etemplate/et2_widget_image.ts index 08034f7772..7d9a341da9 100644 --- a/api/js/etemplate/et2_widget_image.ts +++ b/api/js/etemplate/et2_widget_image.ts @@ -637,7 +637,7 @@ class et2_avatar extends et2_image } ).sendRequest(true); } - if (this.options.crop) + if (this.options.crop && !this.options.readonly) { jQuery(this.image).cropper({ aspectRatio: 1/1,