How can I optimize file size of PDF with images?

I want to decrease file size of my document with many images. What are effective ways to do it?

Typst supports WEBP which is more efficient than JPEG, so I thought that using smaller WEBP images would reduce the file size. But I read Typst reencodes JPEG images, and I don’t know if PDF supports WEBP images, so it seems that Typst would reencode WEBP to JPEG. If Typst encodes it anyway, it seems that the best way would be to just resize the images to a reasonable resolution and let Typst’s encodes do its thing.

PDF seems to support JPEG2000 because PDF/A-2 requires it, and that would be in theory the best option, but Typst does not support JPEG2000.