Image processing in template?

Hello :slight_smile:

I could not find in the documentation (maybe we just can’t?) how to use image processing in template?

I wanted to process my logo in partials/header.html.

Perhaps the postulate that came with is the fact that images in template should already have been optimized?

What you are looking for is this:

1 Like

Yes! But I do not see how can I use this in my themes/.../layouts/...?

You will need to do something like this:

{{- with .Resources.GetMatch "header" -}}
	{{- $image := .Resize "1350x" -}}
	{{- $image.RelPermalink -}}
{{- end -}}