Corrupt image files
For some reason, some uploads to images.hive.blog corrupts image files. At least what our instance complains about when sharp
cannot recognize or finds file to be corrupt. For example, this image seem ok and loads fine.
https://images.hive.blog/DQmVLGeLgYG737DsoF6oN8AqhiAnZSWAg2PMkvbxbtquXKv/IMG_20220806_082821.jpg
But our imagehoster instance images.ecency.com try to load and store copy of image locally gets this error from sharp
{"name":"imagehoster","hostname":"6fad11be28ce","pid":65,"level":50,"err":{"message":"VipsJpeg: Premature end of JPEG file\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\n","name":"Error","stack":"Error: VipsJpeg: Premature end of JPEG file\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\nVipsJpeg: out of order read at line 384\n"},"msg":"unexpected api error: InternalError","time":"2022-08-08T11:08:24.177Z","v":0}
Solution to this problem, we let sharp to figure out best way to store readable data out of image file by setting failOnError: false
. But this is not good solution.
Above image in our instance:
Is it possible some load balancing issue causing this from images.hive.blog side?