I am optimizing a site with large (dozens) quantity of images on page in a grid. For retina support the images are also need to be 2x sized.
The low hanging fruit was to make sure the thumbnail sizes are loaded (which are still considerable 520px wide because of the retina) instead of full original size they were.
However almost all of images are saved in PNG. Which is a huge waste on photographic imagery. It would make sense for generated thumbnails to be JPG... Except that there doesn't seem to be a way to do it.
From looking through the core code the closest seems to be
WP_Image_Editor->get_output_format() but it's doesn't seem friendly to be easily adjusted and targeting specific sizes.
Are there any other points in code where I could try to change the type of image being generated?