How can the pdf output increase in size when I compress an included jpeg image?

Hi yall. I am writing my cv with typst and wanted to reduce the overall filesize. I have

$typst c cv.typ
$du -hs *
1.2M    cv.pdf
8.0K    cv.typ
2.3M    cvphoto.jpg

Then I compress the jpeg with mogrify and then run typst again

$mogrify -quality 80 cvphoto.jpg 
$typst c cv_johannes_lade.typ
$du -hs *
1.4M    cv.pdf
8.0K    cv.typ
1.2M    cvphoto.jpg

You can see that the jpeg memory size almost halved but the pdf output of typst increased by 15%. How is that happening?

Typst currently re-encodes jpeg images, and I could imagine that the new encoding is independent of any jpeg compression features. This would mean that the use of jpeg compression has no effect, and could even make the new encoding less efficient (e.g. due to more noise). See also