[Resolved] Automatically Generated Images

Home Forums Support [Resolved] Automatically Generated Images

Home Forums Support Automatically Generated Images

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1115817
    Janine

    Hi.

    When I upload an image, does GP automatically generate any image sizes?

    I did a search in my functions.php file for add_image_size and set_post_thumbnail_size. I see no entry for it.

    But I did notice this:

    /*Create 365×243 feature images*/
    add_filter( ‘generate_page_header_default_size’, ‘tu_smaller_column_images’ );
    function tu_smaller_column_images( $size ) {
    // Set up our conditional
    if ( ! is_singular() && ! in_array( ‘featured-column’, get_post_class() ) ) {
    return ‘medium’;
    }

    return $size;
    }

    Can you tell what this means?

    I ask because right now in Settings > Media, I have everything set to 0. But when I upload an image file (900×600, 16KB), WP is still generating an additional image file that is 768×512 and 70KB. In other words, much larger.

    https://drive.google.com/file/d/15x7LUUBouo0jWxyt9DK4X-YCTDpBe9CD/view?usp=sharing

    Thank you.

    P.S. I am doing these tests on a staging site of my live site!

    #1116192
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That function is telling GP to use the “medium” image size for your featured images. It doesn’t create a new size, it’s just telling it to use an existing size. That’s a custom function you’ve likely added at some point.

    GP itself doesn’t create any image sizes unless your blog image size options are set in “Customize > Layout > Blog”.

    Those sizes you’re seeing are created by WordPress to use in srcset. You should be able to disable it: https://wordpress.stackexchange.com/a/211985

    #1116265
    Janine

    Thanks, Tom.

    #1116429
    Tom
    Lead Developer
    Lead Developer

    No problem 🙂

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