Image Processing: original picture still included

Hello!

I started using the Image Processing function to automaticly fit images on my page.

But in the builds of my site, the orignal files are still included, even if they arent used. I’m new to Hugo, so I guess I overlooked something? Do I need to explictly remove image resources? If so, how?

This is the shortcode I am using:

{{ if .Get "src" }}
 {{ $image := .Page.Resources.GetMatch (.Get "src")}}
 {{if not (.Get "noFill")}}
  {{ $image = $image.Fill "784x441 Linear q90" }}
 {{end}}

  <figure class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" >
    <img src="{{ $image.RelPermalink }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} {{ with .Get "style" }} style="{{ . | safeCSS }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ end }} />
    {{ if .Get "caption" }}
      <figcaption class="{{ with .Get "captionPosition"}}{{ . }}{{ else -}} center {{- end }}" {{ with .Get "captionStyle" }} style="{{ . | safeCSS }}" {{ end }}>{{ .Get "caption" }}</figcaption>
    {{ end }}
  </figure>

{{ end }}

Cheers
Julian