cshum / imagor

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

Image getting squeezed #333

Closed leonardo2204 closed 1 year ago

leonardo2204 commented 1 year ago

Hi everyone, thanks for the great project!

I'm struggling to understand why some images are getting squeezed when piping through imagor. Here is my url: https://imagor-h3bghbwoxq-uc.a.run.app/gkqCMJllLkhbQHEVpeFiznJq7nI=/400x0/https://storage.googleapis.com/floki-item-images/34049.png

I'm basically resizing every image to 400x0 (no filters or other stuff applied), and I'm getting this strange image. A lot of other images are working fine. Am I missing something here?

Imagor Version: 1.4.1

Original image: 34049

Final (bugged) version: Screenshot from 2023-02-28 17-09-49

Thanks!

nestor-sk commented 1 year ago

Something that happened to me was that I replaced the original image once and with another different one and the service was still returning the processed image from the first image because the path and filter were the same. Just something to check if you can give the image a different name, you can remove the cached processed image, or add a filter (for example 400x1) that is different and see what happens

cshum commented 1 year ago

I tired the above image and it seems to be working fine:

http://localhost:8000/unsafe/400x0/https://storage.googleapis.com/floki-item-images/34049.png

gives the following:

34049

If this is cache related, you may do a quick test by adding a dummy filter (any unrecognisable filter would become no-op) such as ts(1677837918415)