WEBP? When? Please?

It’s also worth noting that Hugo’s Webp support requires the extended version, so you may also want to do something like (esp. if you’re creating a theme):

{{ $images := slice }}
{{ $images = $images | append ($img.Resize "300x") }}
{{ if hugo.IsExtended }}
{{ $images = $images | append ($img.Resize "300x webp") }}
{{ end }}
4 Likes

Great and useful information, thanks!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.