Is this really such a hard problem to solve? Something like littleutils can easily solve this, no? http://littleutils.sourceforge.net/ Also what does this has to do with being "graphics card for the entire internet"?
Resizing or optimizing images, in isolation, is not a hard problem. I've solved subsets of this problem a handful of times before, and I could do it again, but I gladly pay for imgix. The time and headaches saved are easily worth it. The next time I have to rely on ImageMagick will be too soon.