Resize image from static folder


I bet I was reading somewhere that from some Hugo version its now possible to resize images that are stored in static folder. However I can not find it anymore, neither in documentations or on forum.

Do I remember it wrong ?

There are 2 ways to do this:

  1. In your config you can enter assetDir = "static"


  1. Create a symlink of /static/ or any of its subfolders under /assets/

Tnx a lot. Working as expected :slight_smile:

For google searchers here fast example. Put file in /assets/images/image.jpg. Then:

{{ $img := resources.Get “images/image.jpg” }}
{{ with $img }}
  <img src="{{ (.Fill “440x280”).Permalink }}" />
{{ end }}
1 Like

No. You need to do the following:

A. Read the Requesting Help and then open a new Support Ticket explaining the issue while sharing the source code of your project.

B. Never ask, in an already solved support ticket from 7 months ago.