0

I'm creating a new theme and have modified the media settings. From the Settings > Media page, all sizes are marked as 0x0 so they will not be produced.

Media Settings wordpress

I am creating only 1 custom thumbnail in my functions.php file. In total I should be expecting only 2 images uploaded to Wordpress (the original file and the post-page-thumb)

functions.php screenshot

After uploading an image through the media library (test1.jpg), I see that there is an additional image being created by Wordpress 768x960 when I go in FileZilla.

[![filezilla][3]][3]

My functions.php also includes the ability to view custom images when adding media to posts/pages (see above), however, this additional size is not available from the drop down (only the original and thumbnail created).

[![add media][4]][4]

My assumption was that WordPress internally does this somewhere for images that are as large as the one I upload (1600x2000). I don't have any plugins activated.

I tested two additional images: test2.jpg (at 768x960) and test3.jpg (at 600x750). test2.jpg still created the additional 768x960 image, while test3.jpg didnt.

[![new files][5]][5]

Does anyone know what can be causing this issue or a way to fix? Is this an issue with WordPress 4.6.1? I've never experienced it before.

New user so can't include more than two links, but all are viewable here:
https://i.sstatic.net/SQOo6.png [1]
https://i.sstatic.net/05ZRm.png [2]
https://i.sstatic.net/TiOLA.png [3]
https://i.sstatic.net/HJwSU.png [4]
https://i.sstatic.net/bZl69.png [5]

1 Answer 1

1

WordPress v4.4 introduced an additional image size named medium_large which is is 768px wide by default, with no height limit. There is no UI for the medium_large but the size can be changed by updating the options:

/**
 * Updates the medium_large image size. 
 * It's only necessary to execute this code once.
 * Ideally you'd want some kind of UI to allow the dimensions to be specified by the user.
 */
function wpse238808_update_image_size_medium_large() {
    update_option( 'medium_large_size_w', 0 );
    update_option( 'medium_large_size_h', 0 );
}
add_action( 'init', 'wpse238808_update_image_size_medium_large' );

Changing medium_large's width and height to 0 like you've done with the other image sizes will prevent the additional images from being generated.

1
  • 1
    Thank you. I applied the code changes and its working correctly after testing. I looked up the new features for WP 4.4 and saw that they added it in for their adaptive design.
    – SEe
    Commented Sep 11, 2016 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.