From 52e6df6cdf5bc048ceab918c10d6c94a851569ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sat, 15 Feb 2025 03:41:15 +0100 Subject: [PATCH] image: only inline content if svg #1019 --- layouts/partials/_relearn/imageAttributes.gotmpl | 4 ++-- layouts/partials/version.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/_relearn/imageAttributes.gotmpl b/layouts/partials/_relearn/imageAttributes.gotmpl index f41235826a..2ef4b54cc4 100644 --- a/layouts/partials/_relearn/imageAttributes.gotmpl +++ b/layouts/partials/_relearn/imageAttributes.gotmpl @@ -63,11 +63,11 @@ {{- end }} {{- end }} {{- end }} -{{- if and .linkObject $effects.inlinecontent }} +{{- if and .linkObject $effects.inlinecontent (eq .linkObject.MediaType.Type "image/svg+xml") }} {{- $content := .linkObject.Content | replaceRE `(?s)^\s*<\?.*?\?>\s*` "" }} {{- $attributes = merge $attributes (dict "content" $content) }} {{- else if and .linkObject $effects.dataurl }} - {{- $src := printf "data:%s;base64,%s" .linkObject.MediaType (.linkObject.Content | base64Encode) }} + {{- $src := printf "data:%s;base64,%s" .linkObject.MediaType.Type (.linkObject.Content | base64Encode) }} {{- $attributes = merge $attributes (dict "src" $src) }} {{- else }} {{- $attributes = merge $attributes (dict "src" .url) }} diff --git a/layouts/partials/version.txt b/layouts/partials/version.txt index 77bc6f65ae..6bf7bf9e82 100644 --- a/layouts/partials/version.txt +++ b/layouts/partials/version.txt @@ -1 +1 @@ -7.3.2+ad60ecdaa817b167fe3b06c421040a92717b367a \ No newline at end of file +7.3.2+0a3121be8f0b49511eb20df9d2839e10a817fd75 \ No newline at end of file