aboutsummaryrefslogtreecommitdiffhomepage
path: root/helpers
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-09-22 15:15:16 +0200
committerBjørn Erik Pedersen <[email protected]>2023-09-24 11:54:29 +0200
commitef0e7149d63c64269b852cf68a2af67b94b8eec3 (patch)
tree7182a4d3e396d231a3c62c4ca76055eb3ba3a845 /helpers
parentc32094ace113412abea354b7119d154168097287 (diff)
downloadhugo-ef0e7149d63c64269b852cf68a2af67b94b8eec3.tar.gz
hugo-ef0e7149d63c64269b852cf68a2af67b94b8eec3.zip
Add $image.Process
Which supports all the existing actions: resize, crop, fit, fill. But it also allows plain format conversions: ``` {{ $img = $img.Process "webp" }} ``` Which will be a simple re-encoding of the source image. Fixes #11483
Diffstat (limited to 'helpers')
-rw-r--r--helpers/general.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/helpers/general.go b/helpers/general.go
index f8f273397..e484b92f0 100644
--- a/helpers/general.go
+++ b/helpers/general.go
@@ -53,18 +53,6 @@ func TCPListen() (net.Listener, *net.TCPAddr, error) {
}
l.Close()
return nil, nil, fmt.Errorf("unable to obtain a valid tcp port: %v", addr)
-
-}
-
-// InStringArray checks if a string is an element of a slice of strings
-// and returns a boolean value.
-func InStringArray(arr []string, el string) bool {
- for _, v := range arr {
- if v == el {
- return true
- }
- }
- return false
}
// FirstUpper returns a string with the first character as upper case.