How to prevent CKEDITOR from adding image dimensions as a style?
Instead of this:
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]';