Jpeg Image Quality

I’m experiencing bad image quality and big file sizes when using the resize_image() function.
Input image is a 1920px-width Jpeg with ~300kb and it becomes ~700kb and introduces bending.
Qualityloss becomes worse when scaled down even more.

This is the code I used:
resize_image(path=asset, width=1920, op="fit_width", format="jpg", quality=100)

Left: Original, Right: Processed.

Am I doing something wrong?

What are you trying to do with that resize call? You’re setting the width to be the same as the input so it’s not going to really resize anything.
As for the file size, it’s weird. We are calling to to handle the resizing. I’m guessing with a quality of 100, it tries to add more details? Can you try quality=80?

Thanks for the inputs. I set scaling to one just to demonstrate the file size difference - I tried many variants. Every other option like scaling or setting the quality lower decreases the quality even more.
I would expect, that at least quality 100 wouldn’t visible alter the visual quality of the pictures.

I guess it’s to blame the library then. Strange that this didn’t come up yet.
I think if you’re working with photography, it’s not usable right now. At least for me.

If you can reproduce the issue with just the image crate, it’s definitely worth opening an issue there, the whole code for image processing in Zola is zola/ at master · getzola/zola · GitHub