diff --git a/wp-includes/class-wp-image-editor-imagick.php b/wp-includes/class-wp-image-editor-imagick.php index 45a119c9c9..c014696b38 100644 --- a/wp-includes/class-wp-image-editor-imagick.php +++ b/wp-includes/class-wp-image-editor-imagick.php @@ -787,6 +787,10 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor { // We want the thumbnail to be readable, so increase the rendering DPI. $this->image->setResolution( 128, 128 ); + // When generating thumbnails from cropped PDF pages, Imagemagick uses the uncropped + // area (resulting in unnecessary whitespace) unless the following option is set. + $this->image->setOption( 'pdf:use-cropbox', true ); + // Only load the first page. return $this->file . '[0]'; } catch ( Exception $e ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 5a9a33bd7c..a21280c44a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-46237'; +$wp_version = '5.3-alpha-46238'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.