Site logo

[Support request] Adding a custom image size

Home Forums Support [Support request] Adding a custom image size

Home Forums Support Adding a custom image size

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2470024
    Josh

    When I add a new custom image size with this code in my functions.php:

    add_image_size( 'install-system', 300, 200, true);

    I get a doubled version of the image size as listed by wp-cli. Why is it doubling it?
    +—————-+——-+——–+——+——-+
    | name | width | height | crop | ratio |
    +—————-+——-+——–+——+——-+
    | full | | | N/A | N/A |
    | 2048×2048 | 2048 | 2048 | soft | N/A |
    | 1536×1536 | 1536 | 1536 | soft | N/A |
    | large | 1024 | 1024 | soft | N/A |
    | medium_large | 768 | 0 | soft | N/A |
    | medium | 300 | 300 | soft | N/A |
    | install-system | 300 | 200 | hard | 3:2 |
    | thumbnail | 150 | 150 | hard | 1:1 |
    | 1536×1536 | 0 | 0 | soft | N/A |
    | 2048×2048 | 0 | 0 | soft | N/A |
    | install-system | 0 | 0 | soft | N/A |
    +—————-+——-+——–+——+——-+

    What’s weird is the 2nd one is soft cropped.

    When I remove the code from my functions.php both media sizes get removed in the wp-cli output.

    #2470063
    Fernando
    Customer Support

    Hi Josh,

    This is controlled by WordPress. It would be best to first raise a topic here regarding this: https://wordpress.org/support/forum/wp-advanced/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.