diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-09-22 15:15:16 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-09-24 11:54:29 +0200 |
commit | ef0e7149d63c64269b852cf68a2af67b94b8eec3 (patch) | |
tree | 7182a4d3e396d231a3c62c4ca76055eb3ba3a845 /helpers | |
parent | c32094ace113412abea354b7119d154168097287 (diff) | |
download | hugo-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.go | 12 |
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. |