diff --git a/layouts/_partials/images/get-image.html b/layouts/_partials/images/get-image.html index 4b4a00c..6cb94d9 100644 --- a/layouts/_partials/images/get-image.html +++ b/layouts/_partials/images/get-image.html @@ -37,6 +37,15 @@ {{- end -}} {{- end -}} +{{- if ( and $hint ( not $isResizable ) ) -}} + {{- warnidf "pointless-hint" "Hint '%s' provided for an image that is not convertible to .webm, ignoring… (%q)" $hint $img.File.Path }} +{{- end -}} + +{{- $valid_hint_values := ( slice "drawing" "icon" "photo" "picture" "text" ) -}} +{{- if ( and $hint ( not ( in $valid_hint_values $hint ) ) ) -}} + {{- errorf "Hint '%s' is not valid, use one of %q instead. (%q)" $hint $img.File.Path -}} +{{- end -}} + {{- if $isResizable -}}