I have an image handler which serves jpegs from disk to the browser, like this:
_context.Response.ContentType = "image/jpeg";
_context.Response.TransmitFile(filepath);
Trying to follow Googles pagespeed recommendations and it's advising me to losslessly compress these images.
Is there a way I can do that within this handler before serving them. There are a few hundred thousand so optimising them individually wouldn't really be an option.
Thanks