Using Resize - best practice

Post image is used in various places on the site e.g. feature image, next prev, list pagination etc.
Should I implement Resize function to be run only once on entire page for the post image then hardcoded imgset to be used on another places, or can I use Resize for the same image on various places and hugo will not resize the image if desired img size was created earlier?

Direct link to: Image Processing Performance Consideration

It says: If you include this directory in source control, Hugo will not have to regenerate the images in a CI/CD workflow

Should I do anything particular or all is set by default already?

This is the default behaviour.

Git error: filename too long

Resized images under resources have filename too long and I can not commit to Git. Any solution?



I reproduced the problem on Windows when using Command Prompt, Windows Powershell, and Powershell. I was able to fix it with:

git config core.longpaths true

Tested with git version on Windows 11.

I have not been able to find any documentation for this setting.


You could also use a Linux shell on Windows (Git Bash, WSL, etc.).

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