I am using the following code {{< figure src="../img/img.png" title="the image title" >}}
to display image on hugo website and it works fine. I found this piece of code from: Add image to webpage which uses hugo framework
Now I wanted to do some image processing and was using the following link: https://gohugo.io/content-management/image-processing/
I was trying to use the following lines of code:
{{ $image := resources.Get "images/sunset.jpg" }}
{{ $image := resources.GetRemote "https://gohugo.io/img/hugo-logo.png" }}
For first line in above code, the folder structure is as follows. Inside the blog-code(root folder) I created assets/images
, with sunset.jpg inside. It does not work i.e. image is not displayed on the page.
Folder Structure
blog-code/assets/images/sunset.jpg
The second line in above code is fetching a remote image. It also does not work.
I have tried following link, Processing images in Hugo, and few other links but not able to solve the issue.
Please guide, where I am getting wrong.
Thanks.