How we get under 20 KB without ruining the photo
The tool first tries the photo at its current size and lowers the JPG quality step by step until the file fits under 20 KB. It keeps the highest quality that fits. If even low quality is too big, it reduces the pixel size a little at a time, so you get the sharpest photo the limit allows.
We keep the file at or below 20,000 bytes, so it passes portals that count 1 KB as 1,000 bytes and those that count 1,024.