mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 05:30:54 +03:00
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
This commit is contained in:
parent
c32094ace1
commit
ef0e7149d6
13 changed files with 216 additions and 98 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue