fix: keep external image url, and use reflect.IsImageResourceProcessable to check for svg and other non-processable image formats (#1282)
* fix: keep external image url, and use reflect.IsImageResourceProcessable to check for svg * build: update Hugo version to 0.157.0 in the build script. * docs: remove `Local` return value and simplify `Resource` description in image helper * Check for reflect.IsImageResourceProcessable before getting color from image * chore: update minimum Hugo version to 0.157.0
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
{{ end }}
|
||||
|
||||
<div class="article-details"
|
||||
{{- if and $image $image.Resource -}}
|
||||
{{- if and $image (reflect.IsImageResourceProcessable $image.Resource) -}}
|
||||
{{- $colors := $image.Resource.Colors -}}
|
||||
{{- if $colors -}}
|
||||
{{- $vibrant := index $colors 0 -}}
|
||||
|
||||
Reference in New Issue
Block a user