Browse Source

fix: display base64 image link

Weihua Lu 4 years ago
parent
commit
aea8180b69
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/main/frontend/components/block.cljs

+ 6 - 1
src/main/frontend/components/block.cljs

@@ -250,13 +250,18 @@
      (if (and (config/local-asset? href)
               (config/local-db? (state/get-current-repo)))
        (asset-link config title href label metadata full_text)
-       (let [href (cond
+       (let [protocol (and (= "Complex" (first url))
+                           (:protocol (second url)))
+             href (cond
                     (util/starts-with? href "http")
                     href
 
                     config/publishing?
                     (subs href 1)
 
+                    (= protocol "data")
+                    href
+
                     :else
                     (get-file-absolute-path config href))]
          (resizable-image config title href metadata full_text false))))))