-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Bug Report
--- ✅ If you are in the correct location now... --->
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
I changed the height/width of an image size and tried to regenerate only the thumbnails for this specific size with--image_size=medium Here my full command:
wp media regenerate --image_size=medium --skip-delete --only-missing
After the regeneration, the REST API showed only medium under sizes. I checked the postmeta database table for the _wp_attachment_metadata and it seems like, that _wp_attachment_metadata now only contains the regenerated size, all other are gone:
'sizes' =>
array (
'medium' =>
array (
'file' => 'Lissabon-Strassenbahnen-300x214.jpg',
'width' => 300,
'height' => 214,
'mime-type' => 'image/jpeg',
),
),
If I run the command without --image_size its fine again:
wp media regenerate --skip-delete --only-missing
'sizes' =>
array (
'medium' =>
array (
'file' => 'Lissabon-Strassenbahnen-300x214.jpg',
'width' => 300,
'height' => 214,
'mime-type' => 'image/jpeg',
),
'thumbnail' =>
array (
'file' => 'Lissabon-Strassenbahnen-150x150.jpg',
'width' => 150,
'height' => 150,
'mime-type' => 'image/jpeg',
),
'medium_large' =>
array (
'file' => 'Lissabon-Strassenbahnen-768x548.jpg',
'width' => 768,
'height' => 548,
'mime-type' => 'image/jpeg',
),
'logo' =>
array (
'file' => 'Lissabon-Strassenbahnen-180x128.jpg',
'width' => 180,
'height' => 128,
'mime-type' => 'image/jpeg',
),
),
Describe how other contributors can replicate this bug
- Upload an Image
- Change the size settings for
mediumin WordPress - Regenrate the thumbnails with
--image_size=medium - Check postmeta table for
_wp_attachment_metadata
Describe what you would expect as the correct outcome
I would expect, that all other sizes would still be in the metadata, only the specific size changed
Let us know what environment you are running this on
OS: Darwin 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
Shell: /bin/zsh
PHP binary: /usr/local/Cellar/php/7.4.0/bin/php
PHP version: 7.4.0
php.ini used: /usr/local/etc/php/7.4/php.ini
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /Users/johanneskinast/Valet Sites/travel-dealz
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.4.0