The containing div's CSS should have its spaces removed and 'yellow' changed to '#ff0' by rewrite_style_attributes but not by rewrite_style_attributes_with_url.
The image should be rewritten/compressed.