cshum / imagor

Fast, secure image processing server and Go library, using libvips
Apache License 2.0
3.24k stars 122 forks source link

Corrupted images in "file_result_storage" directory #434

Open StepanKuksenko opened 1 month ago

StepanKuksenko commented 1 month ago

Imagor stored a few corrupted images in the "file_result_storage" folder. I've configured it to be cleaned after 24 hours, or if I remove it manually, a new correct image is served and stored.

We just started using Imagor in production, so I am very concerned about figuring out why this behavior occurred.

Example: corrupted

After I removed from the cache: image

cshum commented 1 month ago

This may be the case if the service crashed in the middle of storing the images. Do you have access to the service log?

dlopez051 commented 1 week ago

Hello,

We have a similar problem:

Original image size: 32MB Storage broken image size: 16MB Desired size: 2000x400 with quality filter at 65% Origen of image: web Storage type (result and storage): file storage Expiration: 2d Imagor version: 1.4.12 And no logs available

Original 2dd98ffb899f7baadf46eea5ddb1f648d57961eca44b95098a5b6d65_escalada

Cache 484fb722914f54ff48d21ff13319cf09a048_escalada

Result 9e96bdb42025b8d7f5ccbded95fb7bd58262_escalada

Maybe you can add a double check at the moment that you save the cache image that the image size is the same in the cache.

thueske commented 2 days ago
Bildschirmfoto 2024-07-06 um 07 18 18

Same here. Had this multiple times. The log is empty (only the starting info).