Two issues surfaced in a client-side image-compression tool. First, a deliberately near-incompressible test image came back larger than it went in, yet was still labeled with the tool’s normal success state. Second, the tool’s “try a different format” guidance sometimes suggested the exact format that was already selected. Both were caught by deliberately testing edge cases rather than only the expected, well-behaved path.
⚡ Quick Fix (TL;DR)
The Culprit: The calculations were accurate in both cases — file sizes and percentages were always reported correctly. The bug lived entirely in the presentation layer: the result-state logic didn't check whether output was actually smaller before calling it a win, and the suggestion logic didn't check what was already selected before recommending it.
The Fix: A distinct "no savings found" result state was added with honest framing for when output isn't smaller than input, and the suggestion logic was made aware of the currently selected format so it never recommends what's already active.
Rather not untangle this yourself? Our Done-For-You team handles exactly this kind of thing, start to finish.
See DFY options → Was this helpful? Thanks for the feedback!
Tagged in :