Skip to content

Commit

Permalink
Add option to disable Image Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaz committed Jul 15, 2020
1 parent 1ba985d commit 844e5c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
<>
Expand Down

0 comments on commit 844e5c8

Please sign in to comment.