Why compress first

Base64 encoding adds roughly one third to the binary size. Reducing pixel dimensions and choosing a suitable format can keep the final string manageable.