Most editors include extra tags, attributes, and metadata in SVG files. CodeKit uses SVGO to optimize these files so they're small and fast.
Off By Default
SVG optimization is off by default. Unless you're using a build folder, the input SVG file is overwritten by the minified version. You may not want that (or you may want to set a different output path first) so SVGO is opt-in.
Simply set the Output Action for SVG files to Optimize. For details, read Setting Output Paths & Actions.
First, make sure you've read Setting Language Options.
To set options for all SVG files in a project simultaneously, open Project Settings and choose the SVG category under Languages, as shown above. To change options for just one file, select it and use the inspector pane.
There are way too many options to cover here. Most are fairly self-explanatory, but you should read the official documentation anyway.
Raster Images, Too
CodeKit can also optimize raster images.