# Image Processing in a Range

**URL:** <https://discourse.gohugo.io/t/image-processing-in-a-range/37968>\
**Category:** support\
**Tags:** assets\
**Created:** [March 31, 2022, 2:49pm UTC](https://discourse.gohugo.io/t/image-processing-in-a-range/37968 "2022-03-31T14:49:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [March 31, 2022, 5:45pm UTC](https://discourse.gohugo.io/t/image-processing-in-a-range/37968/5 "2022-03-31T17:45:37Z")

</div>

Within a template (e.g., single.html)

```auto
{{ range .Params.gallery }}
  {{ with $.Resources.GetMatch . }}
    {{ with .Resize "500x webp q75" }}
      <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
    {{ end }}
  {{ end }}
{{ end }}

```

Within a shortcode:

```auto
{{ range .Page.Params.gallery }}
  {{ with $.Page.Resources.GetMatch . }}
    {{ with .Resize "500x webp q75" }}
      <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
    {{ end }}
  {{ end }}
{{ end }}

```

---

_[View the full topic](https://discourse.gohugo.io/t/image-processing-in-a-range/37968)._
