There is one more way to do this (much simpler), by using Disallowed Content introduced in CKEditor 4.4.0:
CKEDITOR.replace( 'editor1', {
disallowedContent : 'img{width,height}'
} );
or in config.js:
config.disallowedContent = 'img{width,height}';
This rule will disallow inline styles (width and height) for img element, CKEditor will use attributes instead.
If for some reason, you will notice that the width/height input elements in the Image dialog window are now gone, set the following as well:
config.extraAllowedContent = 'img[width,height]';
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…