diff --git a/frontend/src/app/main/ui/shapes/embed.cljs b/frontend/src/app/main/ui/shapes/embed.cljs index 0c4fbd2599..44cf489b70 100644 --- a/frontend/src/app/main/ui/shapes/embed.cljs +++ b/frontend/src/app/main/ui/shapes/embed.cljs @@ -34,6 +34,7 @@ (rx/map identity obs))) sub (->> (rx/from urls) + (rx/filter some?) (url-mapping) (rx/reduce conj {}) (rx/subs (fn [data] diff --git a/frontend/src/app/main/ui/shapes/fills.cljs b/frontend/src/app/main/ui/shapes/fills.cljs index 116797c8b7..fec24395e2 100644 --- a/frontend/src/app/main/ui/shapes/fills.cljs +++ b/frontend/src/app/main/ui/shapes/fills.cljs @@ -30,9 +30,11 @@ (let [{:keys [x y width height]} (:selrect shape) {:keys [metadata]} shape - has-image (or metadata (:fill-image shape)) - uri (if metadata + has-image? (or metadata (:fill-image shape)) + uri (cond + metadata (cfg/resolve-file-media metadata) + (:fill-image shape) (cfg/resolve-file-media (:fill-image shape))) embed (embed/use-data-uris [uri]) transform (gsh/transform-matrix shape) @@ -66,7 +68,7 @@ (obj/set! "width" width) (obj/set! "height" height))]) - (when has-image + (when has-image? [:image {:xlinkHref (get embed uri uri) :width width :height height}])]])])))))