           minified = minifyImage(absPath, image)
           hashed = hash(minified)
           
-          ext = extname absPath
-          out = join outputPath, "#{hashed}#{ext}"
+          parsed = parsePath absPath
+          out = join outputPath, "#{parsed.name}-#{hashed}#{parsed.ext}"
           fs.writeFileSync out, minified
           renamed[absPath] = out
         else if type is 'javascript'

          minified = minifyImage(absPath, image)
          hashed = hash(minified)
          
          ext = extname absPath
          out = join outputPath, "#{hashed}#{ext}"
          fs.writeFileSync out, minified
          renamed[absPath] = out


join         = require('path').join
minifyImage  = require './minify-image'
minifyScript = require './minify-javascript'
parsePath    = require('path').parse
parseCssUrl  = require './parse-css-url'
extname      = require('path').extname

