# Nil pointer evaluating resource.Resource

**URL:** <https://discourse.gohugo.io/t/nil-pointer-evaluating-resource-resource/30289>\
**Category:** support\
**Created:** [December 30, 2020, 2:04pm UTC](https://discourse.gohugo.io/t/nil-pointer-evaluating-resource-resource/30289 "2020-12-30T14:04:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxisme](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maxisme/32/13141_2.png) [@maxisme](https://discourse.gohugo.io/u/maxisme)\
**Post date:** [December 30, 2020, 2:04pm UTC](https://discourse.gohugo.io/t/nil-pointer-evaluating-resource-resource/30289/1 "2020-12-30T14:04:13Z")

</div>

I currently have the variable `.Params.image` which returns: `"/images/840ef643-14b0-487a-a85c-ca309748cd20.jpeg"`.

I am wanting to resize these images.

I have tried:

```auto
    {{ $image := resources.GetMatch "/images/6ad021e0-90a2-49df-96f6-8c6b55dbb4e2.jpeg" }}
    {{ $thumb := $image.Fill "100x100" }}

```

But this returns the error:

```auto
at <$image.Fill>: nil pointer evaluating resource.Resource.Fill

```

My project structure is:

`static/images/`

---

<div class="post-metadata">

**Author:** ![maxisme](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maxisme/32/13141_2.png) [@maxisme](https://discourse.gohugo.io/u/maxisme)\
**Post date:** [December 30, 2020, 2:10pm UTC](https://discourse.gohugo.io/t/nil-pointer-evaluating-resource-resource/30289/2 "2020-12-30T14:10:51Z")

</div>

Needed to set:

```auto
assetDir = "static"

```

in my config

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [January 1, 2021, 2:10pm UTC](https://discourse.gohugo.io/t/nil-pointer-evaluating-resource-resource/30289/3 "2021-01-01T14:10:52Z")

</div>

Closed on January 1, 2021, 2:10pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
