This plugin is an attempt to prevent distorted images when a CSS max-width rule is in effect and the image is inserted using the visual editor.
Just drop the .php file into the plugins folder and activate it. It should work fine out of the box.
By default, the plugin removes all "width" and "height" attributes from images, that contain the term "wp-image-" in their class.
To enable proportional scaling, a width can be entered here. If this width is zero, scaling is disabled and the attributes are removed.
Additionally, images can be selected by terms that appear in their class attribute. It's a space separated list, so "wp-image- foo" will match against "wp-image-" and "foo". If one of these terms is missing, the image is not processed.