# Wrong type for value error when running resources.Minify

**URL:** <https://discourse.gohugo.io/t/wrong-type-for-value-error-when-running-resources-minify/32043>\
**Category:** support\
**Created:** [March 29, 2021, 11:24am UTC](https://discourse.gohugo.io/t/wrong-type-for-value-error-when-running-resources-minify/32043 "2021-03-29T11:24:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunbect](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sunbect](https://discourse.gohugo.io/u/sunbect)\
**Post date:** [March 29, 2021, 11:24am UTC](https://discourse.gohugo.io/t/wrong-type-for-value-error-when-running-resources-minify/32043/1 "2021-03-29T11:24:30Z")

</div>

Running this in /layouts/index.html

```
{{ $styles := resources.Get "css/styles.css" | resources.Minify }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen" />

```

I get the following error:

> ERROR 2021/03/29 16:47:57 Failed to render pages: render of “home” failed: “/mnt/c/Users/yashb/quickstart/layouts/index.html:8:51”: execute of template failed: template: index.html:8:51: executing “index.html” at : wrong type for value; expected resources.ResourceTransformer; got resource.Resource

My CSS file is located at /public/assets/css/styles.css

---

<div class="post-metadata">

**Author:** ![nfriedli](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/nfriedli/32/26027_2.png) [@nfriedli](https://discourse.gohugo.io/u/nfriedli)\
**Post date:** [March 29, 2021, 11:32am UTC](https://discourse.gohugo.io/t/wrong-type-for-value-error-when-running-resources-minify/32043/2 "2021-03-29T11:32:02Z")

</div>

> [@sunbect](#):
>
> My CSS file is located at /public/assets/css/styles.css

Your CSS should be un `/assets/`, not `/public/assets/`.

---

<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:** [March 31, 2021, 11:38am UTC](https://discourse.gohugo.io/t/wrong-type-for-value-error-when-running-resources-minify/32043/4 "2021-03-31T11:38:32Z")

</div>

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