Library for optimizing images through public online image optimization services