Image compression tab
Pick a JPEG or PNG, set a maximum width in pixels (images narrower than that stay unchanged except for re-encoding), and adjust JPEG quality. PNG remains PNG but is redrawn to the canvas — transparency handling depends on the browser. Nothing is uploaded.
PDF compression tab (lossy)
Each page is rasterized with pdf.js at the render scale you choose, then embedded as a JPEG in a fresh PDF via pdf-lib. That can dramatically reduce size for scan-like pages but will soften text and flatten vector graphics. Do not use this mode when you need pixel-perfect vector output.