这是一个已知问题。我在某处读到它将在即将发布的版本中解决。在此之前,您可以在functions.php
. 只需调整图像大小。
if (function_exists('add_image_size')) {
add_image_size( 'dummy-1', 940, 450, true );
add_image_size( 'dummy-2', 480, 0 );
}
global $_wp_additional_image_sizes;
foreach ( $_wp_additional_image_sizes as $name => $image_size ){
update_option( $name."_size_w", $image_size['width'] );
update_option( $name."_size_h", $image_size['height'] );
update_option( $name."_crop", $image_size['crop'] );
}
add_filter( 'intermediate_image_sizes', 'regenerate_custom_image_sizes' );
function regenerate_custom_image_sizes( $sizes ){
global $_wp_additional_image_sizes;
foreach ( $_wp_additional_image_sizes as $name => $size ){
$sizes[] = $name;
}
return $sizes;
}