See https://discourse.gohugo.io/t/56922/11.
This isn't anything new.
In short, creating a page resource (an image) by setting content.value to the string returned by a global resource's .Content value results in intermittent errors:
error calling Resize: failed to resize image "/home/kijana/Code/hugo-forum-topic-54852/content/products/_content.gotmpl": resize /products/window-frame/01.jpg: invalid JPEG format: short Huffman data
But the image is not corrupt in any way (views fine in any app, exiftool likes it, ImageMagick has no complaints, etc.).
In some cases I had to run this command 20 times to trigger the error:
The page resource is created without error if I set content.value to the global resource itself, which per the documentation is noted to be "more efficient".
See https://discourse.gohugo.io/t/56922/11.
This isn't anything new.
In short, creating a page resource (an image) by setting
content.valueto the string returned by a global resource's.Contentvalue results in intermittent errors:But the image is not corrupt in any way (views fine in any app, exiftool likes it, ImageMagick has no complaints, etc.).
In some cases I had to run this command 20 times to trigger the error:
The page resource is created without error if I set
content.valueto the global resource itself, which per the documentation is noted to be "more efficient".