resources.Copy not working for global resources (images) with same name

Hello!

For most of my sites, I was able to use resources.Copy to rename a page resource with an expected name. However, today I tried doing that for an image in /assets directory and it turns out, the processed image doesn’t appear. I still continue to see the full-size image. Am I missing something or is this not supposed to work?

Here’s the repo: GitHub - Hrishikesh-K/hugo-44516

As you can see, using a different name than the original image works, using a different path works as well, but using the same path + name, doesn’t work.

This is a known issue:
https://github.com/gohugoio/hugo/issues/10412

Ahh, thanks for clarifying. I agree with the discussion there, the fix for this might not be trivial. I’ll use a different way.

1 Like

I’ve added a note to the relevant documentation.

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