TL;DR: It seems Hugo’s image processing is currently ignoring cache, always reprocessing all image files.
In my site, I use image processing to turn each JPG file to a fixed set of WebP files, each in a different resolution (to get responsive images). Because of this, I was using Hugo’s extended version, to be able to encode WebP files. And, to avoid making this processing in the server (which is Netlify), I usually run the JPG > WebP processing locally, so all the generated WebP files can be version-controlled. This worked fine, until now.
Today I’m updating my personal site from 0.152.2 to 0.154.2 (current). First, I tested the extended version, which took very MUCH longer than usual to build my site: Hugo reprocessed all the images, generating different filenames. But, as no error was thrown, I then tested the standard version (which since 0.153 got WebP processing). It again took way much longer than usual, and, to my surprise, all the filenames were different from the extended-generated ones. (In those tests, I’ve always ran hugo server –gc .)
Then, I stopped Hugo server and re-ran it (same Hugo version, same Hugo executable), hoping to get normal build times (as the cached files would not need to be regenerated), which in my machine are around 6 seconds. But Hugo reprocessed again all the images, ignoring the cache and, obviously, tooking much longer than expected (around 15 minutes).
I then turned back to extended version, and the results were the same: an always very long build time, despite the cache.
So, it seems to me image file caching is somewhat nor deterministic nor working anymore, and this happened between 0.152.2 and 0.154.2.