Error building site that utilizes Hugo's image processing

Hello guys. what could be the reason for this error?

Built in 13280 ms
Error: Error building site: failed to render pages: render of "page" failed: "C:
\xxx\xxx\xxx\xxx\xxx\rattan\themes\rattan\layouts\products\single.h
tml:5:31": execute of template failed: template: products/single.html:5:31: exec
uting "products/single.html" at <$imageResource.Fill>: error calling Fill: image
 "C:\\xxx\\xxx\\xxx\\xxx\\xxx\\rattan\\content\\uploads\\tray-set3.
jpg": open C:\xxx\xxx\xxx\xxx\xxx\rattan\resources\_gen\images\uplo
ads\tray-set3_hu3386a808808f2aa9a7a7844002ca2d23_181121_200x200_fill_q75_box_sma
rt1.jpg: Access is denied.

Missing file rights or a file that disappeared. Try deleting the resources folder and run hugo again and see if it persists. Try not to have “mounts” or “symlinks” in your project.

Thank you @davidsneighbour for always helping me. I did what you have suggested and the result is that it created the necessary directories e.g. resources, _gen, assets, images, uploads but the generated file. Could it be caused by an antivirus? That’s my suspicion. I’m not on Linux.

Because you are not posting the layout file that causes this issue it’s hard to say what the real issue is. But Antivirus might be the last straw (as in probably not). I think you might have a step BEFORE the failing one that does not create the image properly but does not fail loudly so the path is not found in the next step and returns an “Access denied” error.

Phew! I am right. I just temporarily uninstalled my antivirus and everything works smoothly…

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