-
Notifications
You must be signed in to change notification settings - Fork 958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Media regeneration issue #3859
Comments
*I see! 362 < 400 |
Correct :) |
…ensions are larger than the image
Put out a PR for the issue: #3879 |
I think this is actually because thumbnail isn't included as an image size in I've ported this issue over to the new repository for |
It seems that the following fails when you regenerate thumbs for an image which has a dimension smaller than a registered image size:
wp media regenerate --yes --only-missing
We have two test images, a) 1000x1000 b) 627x362.
we register a size of 400x400
We fetch via media_sideload_image
When we call:
wp media regenerate --yes --only-missing
It will always regenerate the thumbnails for b) due to:
wp eval 'print_r(array_diff( get_intermediate_image_sizes(), array_keys( wp_get_attachment_metadata(111)['sizes'] ) ));'
Array
(
[1] => medium
[2] => medium_large
[3] => large
)
1 = 400x400, 2=512x512, 3=768x768
This arises in https://github.com/wp-cli/wp-cli/blob/master/php/commands/media.php#L375
The text was updated successfully, but these errors were encountered: