         dst: tmp_resized
         width: format.width
         height: format.height
+      .then (image) ->
+        if minify
+          Compress.compressImage(tmp_resized, tmpDir, extension)
       .then (image) =>
         @sendMetrics 'increment', 'image.resized'
         header = 'x-amz-acl': 'public-read'

Lynx = require 'lynx'
Promise = require 'bluebird'
easyimage = require 'easyimage'
{CustomError} = require '../errors'
fs = Promise.promisifyAll require('fs')


  ###*
   * @private
   *
   * Resizes, optionally compress and uploads a given image to the bucket
   * @param  {String} image The path the the image
   * @param  {String} prefix A prefix for the image key
   * @param  {Array} formats A list of formats for image resizing
   * @param  {String} [tmpDir] A path to a tmp folder
   * @param  {Boolean} minify Information if compressing is required
   * @return {Promise} A promise, fulfilled with the upload response or rejected with an error
  ###
  _resizeCompressAndUploadImage: (image, prefix, formats, tmpDir = '/tmp', minify) ->

    extension = path.extname image
    basename = path.basename image, extension
