mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-02-19 02:00:43 +00:00
image: only inline content if svg #1019
This commit is contained in:
parent
0a3121be8f
commit
52e6df6cdf
2 changed files with 3 additions and 3 deletions
|
@ -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) }}
|
||||
|
|
|
@ -1 +1 @@
|
|||
7.3.2+ad60ecdaa817b167fe3b06c421040a92717b367a
|
||||
7.3.2+0a3121be8f0b49511eb20df9d2839e10a817fd75
|
Loading…
Add table
Reference in a new issue