diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js index e89aae27aa..9fdac91699 100644 --- a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js +++ b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js @@ -155,11 +155,16 @@ ve.ce.MWBlockImageNode.prototype.updateClasses = function ( oldAlign ) { * @param {Object} [dimensions] Dimension object containing width & height */ ve.ce.MWBlockImageNode.prototype.updateSize = function ( dimensions ) { - var + var isError = this.model.getAttribute( 'isError' ), type = this.model.getAttribute( 'type' ), borderImage = this.model.getAttribute( 'borderImage' ), hasBorderOrFrame = ( type !== 'none' && type !== 'frameless' ) || borderImage; + if ( isError ) { + this.$element.css( { width: '', height: '' } ); + return; + } + if ( !dimensions ) { dimensions = { width: this.model.getAttribute( 'width' ),