feat: add hint support

This commit is contained in:
Ben Goldsworthy 2025-07-09 21:22:38 +02:00
parent 3a2a6482da
commit b82719b135
No known key found for this signature in database

View file

@ -37,6 +37,15 @@
{{- end -}} {{- end -}}
{{- 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 -}}
<!-- Rendering --> <!-- Rendering -->
{{- if $isResizable -}} {{- if $isResizable -}}