Image Processing syntax

Sorry for a likely silly question but I am stuck on a likely syntax issue (since I am not a developer).
I am trying to implement a figure shortcode with the following code:

{{ $src := .Get "src" }}
{{ $caption := .Get "caption" }}
{{ $class := .Get "class" }}
{{ $lqipsrc := $src.Resize "600x q20 Center" }}
    <figure{{ with $class }} class="{{ . }}"{{ end }}>
          <img class="lazyload blur-up" src="{{ $lqipsrc }}" data-src="{{ $src }}" {{ if $caption }}alt="{{ $caption }}"{{ end }} />
        {{ if $caption }}
        <small>{{ $caption }}
        </small>{{ end }}
      {{ end }}

The error message is:

<$src.Resize>: can't evaluate field Resize in type string

I don’t know how to resize the original image with .Resize function. The error seems to be related to how address the original image.
I need some help to correct the syntax as far as I understand.

What is your question?

Please read Requesting Help and share your code. I can’t reproduce your issue from just that snippet.

Sorry I just edit my above message to make it clearer