-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
Bug Report
- 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
The custom image sizes are listed twice. Once with the correct information and once with the height and width missing.
+-----------------------+-------+--------+------+-------+
| name | width | height | crop | ratio |
+-----------------------+-------+--------+------+-------+
| full | | | N/A | N/A |
| large | 1024 | 1024 | soft | N/A |
| medium_large | 768 | 0 | soft | N/A |
| medium | 300 | 300 | soft | N/A |
| mini-profile-thumb | 220 | 220 | soft | N/A |
| thumbnail | 150 | 150 | hard | 1:1 |
| mini-navigation-thumb | 150 | 20 | soft | N/A |
| edit-screen-thumb | 120 | 120 | soft | N/A |
| mini-frontpage-thumb | 100 | 50 | soft | N/A |
| edit-screen-thumb | 0 | 0 | soft | N/A |
| mini-profile-thumb | 0 | 0 | soft | N/A |
| mini-navigation-thumb | 0 | 0 | soft | N/A |
| mini-frontpage-thumb | 0 | 0 | soft | N/A |
+-----------------------+-------+--------+------+-------+
Describe how other contributors can replicate this bug
- Register a custom image size
add_image_size( 'mini-profile-thumb', 220, 220 ); wp media image-size- See results
Describe what you would expect as the correct outcome
I expect the result to look as follows
+-----------------------+-------+--------+------+-------+
| name | width | height | crop | ratio |
+-----------------------+-------+--------+------+-------+
| full | | | N/A | N/A |
| large | 1024 | 1024 | soft | N/A |
| medium_large | 768 | 0 | soft | N/A |
| medium | 300 | 300 | soft | N/A |
| mini-profile-thumb | 220 | 220 | soft | N/A |
| thumbnail | 150 | 150 | hard | 1:1 |
| mini-navigation-thumb | 150 | 20 | soft | N/A |
| edit-screen-thumb | 120 | 120 | soft | N/A |
| mini-frontpage-thumb | 100 | 50 | soft | N/A |
+-----------------------+-------+--------+------+-------+
Let us know what environment you are running this on
OS: Linux 3.10.0-1062.4.1.el7.x86_64 #1 SMP Wed Sep 25 09:42:57 EDT 2019 x86_64
Shell:
PHP binary: /usr/local/bin/php
PHP version: 7.1.32
php.ini used: /usr/local/etc/php/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: /app
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config: /app/wp-cli.yml
WP-CLI version: 2.3.0
WordPress version: 5.2.4
Provide a possible solution
The code in the developer handbook is a good solution https://developer.wordpress.org/reference/functions/get_intermediate_image_sizes/#comment-730
rob006, buhlahkay, zethzeth and cbautista103