There is a project going on about the image sizes. You can follow it right here.
Right now, you can try using shortcode_atts_gallery filter. Take a look at these codes to get a hint:
/* Register shortcode_atts_gallery filter callback */
add_filter( 'shortcode_atts_gallery', 'meks_gallery_atts', 10, 3 );
/* Change attributes of wp gallery to modify image sizes for your needs */
function meks_gallery_atts( $output, $pairs, $atts ) {
/* You can use these sizes:
- thumbnail
- medium
- large
- full
or, if your theme/plugin generate additional custom sizes you can use them as well
*/
$output['size'] = 'medium'; //i.e. This will change all your gallery images to "medium" size
return $output;
}
You can find more information about shortcode_atts_gallery right here.