We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f9b605 commit c6baf72Copy full SHA for c6baf72
src/wp-includes/media.php
@@ -918,11 +918,15 @@ function wp_get_registered_image_subsizes() {
918
$all_sizes = array();
919
920
foreach ( get_intermediate_image_sizes() as $size_name ) {
921
- $size_data = array(
922
- 'width' => 0,
923
- 'height' => 0,
924
- 'crop' => false,
925
- );
+ $default_sizes = array( 'thumbnail', 'medium', 'medium_large', 'large' );
+ foreach ( get_intermediate_image_sizes() as $size_name ) {
+ $size_data = array(
+ 'width' => 0,
+ 'height' => 0,
926
+ 'crop' => false,
927
+ 'output_mimes' => in_array( $size_name, $default_sizes, true ),
928
+ );
929
+ }
930
931
if ( isset( $additional_sizes[ $size_name ]['width'] ) ) {
932
// For sizes added by plugins and themes.
0 commit comments