<p>Are you on a multi-site environment? I had a similar issue today because I did not had an absolute path set in the settings of the volume.</p>
<p><strong>Make sure you have an absolute path set for the volume</strong>, e.g. <code>/home/web123/htdocs/images</code>. In my case, it was first set to just <code>images</code> and then to <code>@webroot/images</code> which both resulted in the error.</p>

CC BY-SA 4.0
2023-01-06T19:07:11.250Z
There goes 2 hours of my precious life… Thanks for pointing this out! Do you know why this is? I am on Craft CMS 4.3.6
outline4
CC BY-SA 4.0
2023-01-30T12:01:54.500Z
I've upgraded from Craft 3 (forgot the full version) and the / was missing in the path. Didn't fix the issue but it was still missing
Jaytrix
CC BY-SA 4.0
2022-10-12T21:19:53.150Z
2022-10-12T21:19:53.150Z
Luke
<p>I'm trying to optimise page speeds for my website.
One thing I'm looking into is optimising image file sizes, but Image Transform in CraftCMS doesn't seem to work.</p>
<p><strong>Before:</strong></p>
<pre><code>{% set asset = entry.providerAppBadge.one() %}
    &lt;img src=&quot;{{ asset.getUrl()}}&quot; alt=&quot;{{ entry.title }}&quot; /&gt;
</code></pre>
<p><strong>After:</strong></p>
<ol>
<li><p>Created an 'Image transform'
<a href="https://i.sstatic.net/DmAbR.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DmAbR.png" alt="enter image description here" /></a></p>
</li>
<li><p>Added Image transform name to the code as a string</p>
</li>
</ol>
<pre><code>
    {% set asset = entry.providerAppBadge.one() %}
        &lt;img src=&quot;{{ asset.getUrl('appBadge50x50')}}&quot; alt=&quot;{{ entry.title }}&quot; /&gt;

</code></pre>
<ol start="3">
<li><p>Image does not load correctly on website. When I take a look at Google Inspect, I can see Craft CMS did load a src url (<a href="https://mywebsite.com/actions/assets/generate-transform?transformId=283" rel="nofollow noreferrer">https://mywebsite.com/actions/assets/generate-transform?transformId=283</a>), but when visiting this url directly, I get this error.
<a href="https://i.sstatic.net/wxG2T.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wxG2T.png" alt="enter image description here" /></a></p>
</li>
<li><p>FYI, When I add <code>width=&quot;{{ asset.getWidth('appBadge50x50') }}&quot;</code>, it does load the 50px width correctly, so the Transform Image seems to be set up and recognised correctly.</p>
</li>
</ol>

CC BY-SA 4.0
2022-03-06T20:14:06.883Z
It's not possible to tell what's going wrong from that error message alone – try enabling [`devMode`](https://craftcms.com/knowledge-base/what-dev-mode-does), which should throw up a full stack trace. Alternatively, the logs in `storage/logs` might provide a clue.
Mats Mikkel Rummelhoff
<image-transforms>
Image transform returns error
# Image transform returns error

(Asked by: username_0 on 2022-03-06)

I'm trying to optimise page speeds for my website.
One thing I'm looking into is optimising image file sizes, but Image Transform in CraftCMS doesn't seem to work.
Before:
{% set asset = entry.providerAppBadge.one() %}
    

After:

Created an 'Image transform'


Added Image transform name to the code as a string



    {% set asset = entry.providerAppBadge.one() %}
        



Image does not load correctly on website. When I take a look at Google Inspect, I can see Craft CMS did load a src url (https://mywebsite.com/actions/assets/generate-transform?transformId=283), but when visiting this url directly, I get this error.


FYI, When I add width="{{ asset.getWidth('appBadge50x50') }}", it does load the 50px width correctly, so the Transform Image seems to be set up and recognised correctly.

**Tags:** image-transforms
> **Comments:**
> **username_1**: It's not possible to tell what's going wrong from that error message alone – try enabling [`devMode`](https://craftcms.com/knowledge-base/what-dev-mode-does), which should throw up a full stack trace. Alternatively, the logs in `storage/logs` might provide a clue.  

---

## 1 answers

### Answer by username_2 on 2022-10-12. Score: 1

Are you on a multi-site environment? I had a similar issue today because I did not had an absolute path set in the settings of the volume.

**Make sure you have an absolute path set for the volume**, e.g. `/home/web123/htdocs/images`. In my case, it was first set to just `images` and then to `@webroot/images` which both resulted in the error.

> **Comments:**
> **username_3**: There goes 2 hours of my precious life… Thanks for pointing this out! Do you know why this is? I am on Craft CMS 4.3.6  
> **username_4**: I've upgraded from Craft 3 (forgot the full version) and the / was missing in the path. Didn't fix the issue but it was still missing  

---

