Skip to content

Add image processing support for WebP image resources #5924

@Elinvention

Description

@Elinvention

I tried this code

{{ $imageResource := .Page.Resources.GetMatch "**/*.webp" }}
{{ $resized := $imageResource.Resize "180x" }}
{{ $resized.RelPermalink }}

but I get an error:

<$imageResource.Resize>: can't evaluate field Resize in type resource.Resource

The .ResourceType is correctly identified as image. If I replace that with a jpg version it works.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions