Is sharp using cache when an image is resized?
I am facing this strange thing. Say I have a given image at location '/something/image.png'.
Now I update the image at the above location and resize the image a multiple times.
await sharp(inputFile).resize(width, height).toFile(destinationFile)
What I am observing here, that the resized image somehow still refers to my old image. The new image is not resized.
This is pretty strange to me. Any workaround here?
Hello, input images are cached - see cache.
The input and output file paths cannot be the same and toFile is asynchonous. Is there code not shown here that could also be modifying destinationFile? Are you able to provide a complete, standalone example that fails in this manner?
Also ran into this problem. Perhaps it is worth adding a mention of a cache to the main README.md file?
@kushubham9 I hope this answered your question.