Eliminating this feature isn’t happening. But this post seems interesting:
What would it take to have Discourse try using optipng first, and then use the resulting “optimized” size to determine whether it wants to go to JPG? Or would that be too slow?