        (when-header-val "ETag" (str "\"" (etag image) "\""))
        (header "X-Thumbnailer" "Vignette")
        (add-content-disposition-header image-map image)
-       (add-surrogate-header image-map)))
+       (add-surrogate-header image-map)
+       (add-vary-header image-map)))
   ([image]
    (create-image-response image nil)))
 

(declare create-image-response
         add-content-disposition-header
         add-surrogate-header
         surrogate-key)

(defn when-header-val

      (digest/sha1 (fully-qualified-original-path image-map))
      (catch Exception e
        (str "vignette-" (:original image-map))))))

(def vary-accept-mime-types #{"image/jpeg" "image/png"})
(defn is-vary-required
  [file]
  (contains? vary-accept-mime-types (mime-type-of (or file ""))))

(defn add-vary-header
  [response-map image-map]
  (if (is-vary-required (original-path image-map))
  (-> response-map
      (header "Vary" "Accept"))
  response-map))

