Compress PDF of images without downsampling

How can I compress a 300 DPI PDF of images without downsampling? e.g. without using gs or alternative to convert it into a 150 DPI PDF?

I’m looking for something like https://docupub.com/pdfcompress/ but with Linux batch functionality.