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() %}
<img src="{{ asset.getUrl()}}" alt="{{ entry.title }}" />
After:
{% set asset = entry.providerAppBadge.one() %}
<img src="{{ asset.getUrl('appBadge50x50')}}" alt="{{ entry.title }}" />
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.
devMode
, which should throw up a full stack trace. Alternatively, the logs instorage/logs
might provide a clue.