Short answer
An image can become larger after compression when it was already optimized, when the new format is not suited to its pixels, or when metadata and encoding choices add overhead.
When this applies
This is common with small assets, already-compressed JPGs, simple PNGs, and conversions made without changing the image dimensions.
Practical review steps
- Keep the smaller of the original and output files.
- Compare dimensions, format, and file size before replacing an asset.
- Do not assume a conversion is an improvement without a visual and size check.
Check the actual color pair
Use the free Image Squeeze with the foreground and background colors from the real component. It provides an immediate AA and AAA ratio check in the current browser tab.
Source and limit
For the formal requirement, review W3C's WCAG contrast minimum guidance. A ratio result checks a color pair; it is not a complete accessibility audit.