Please correct me if I'm wrong, but you currently seem to only be able to set the quality on the entire directory of images when you hook up the middleware.
Would it be desirable to be able to optionally pass a quality parameter so this could be set on a per-image basis? I think this would be nice for use with the Save-Data header in user land.