Is is accurate that there is no way to rename a resource file without duplicating it ?
I found only {{$large = resources.Copy (printf “Images/%v-q75-large.webp” (path.BaseName $img.RelPermalink)) $large}}
Hi Tom
Could you clarify how this is a flow in Hugo?
The impossibility to precise the name/path of resources in a simple name without duplicating them is not legitimate.
I feel like I must be missing something here.
There isn’t a problem generating a responsive srcset with fingerprinted filenames. They can be generated by .Resize and .RelPermalink for each required image size.
Ok, you might have a point. But from build to build, does the names with their hash value stay the same ? If they do since it’s just for one picture and I don’t have to automatize this, I can just print the names once to get them.
edit: I did this, .RelPermalink did the trick. the path shouldn’t change since I never have two images of the same name in my whole disk.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.