          (uuid? collid)
          (uuid? imageid)]}
   (let [filename (fs/base-name localpath)
-        [width height] (retrieve-image-size localpath)
+        storage media/images-storage
+        [width height] (time (retrieve-image-size localpath))
         extension (second (fs/split-ext filename))
         path @(st/save storage filename localpath)
         params {:name filename


;; --- Colors Collections Importer

(def storage media/images-storage)

(defn- create-image-collection
  "Create or replace image collection by its name."
  [conn {:keys [name] :as entry}]
  (let [id (uuid/namespaced +imates-uuid-ns+ name)
        sqlv (sql/create-image-collection {:id id :name name})]
    (sc/execute conn sqlv)

      (create-image conn id imageid fpath))))

(defn- process-images-entry
  [conn basedir {:keys [path regex] :as entry}]
  {:pre [(us/valid? ::import-entry entry)]}
  (let [id (create-image-collection conn entry)
        path (fs/resolve basedir path)]
    (doseq [fpath (fs/list-files path)]
      (when (re-matches regex (str fpath))
        (import-image conn id fpath)))))
