Currently, GalleryProcessor (such as ScalingGalleryProcessor) takes a configuration for the default compression quality (e.g., 1.0).
It would be better if it takes the compression quality from the input JPEG (or other available format) if possible.
For example, ImageMagick does that in its convert command. 
This will give more flexibility in most cases, regardless which compression ratio is used in the input JPEG file. Sometimes users meet weird situations if they see a hero image variant (smaller dimension than original image) could result in bigger file size.
If the system takes the input compression ratio wherever possible, it should be more convenient.