From 844e5c8cdde842c435af46513637434c2dc419ae Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 15 Jul 2020 10:54:00 -0700 Subject: [PATCH] Add option to disable Image Editor --- packages/block-library/src/image/image.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/image/image.js b/packages/block-library/src/image/image.js index 87fd783ae5e63c..a5bb91443a340d 100644 --- a/packages/block-library/src/image/image.js +++ b/packages/block-library/src/image/image.js @@ -226,7 +226,8 @@ export default function Image( { } }, [ isSelected ] ); - const canEditImage = id && naturalWidth && naturalHeight; + const isEditorEnabled = ! window._wpImageEditorDisabled; + const canEditImage = id && naturalWidth && naturalHeight && isEditorEnabled; const controls = ( <>