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:
Jimmy
2026-03-04 13:05:17 +01:00
committed by GitHub
parent a0bd0073bb
commit 78800c7379
5 changed files with 21 additions and 20 deletions
+1 -1
View File
@@ -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 -}}