• Hello there!

    many themes and plugins are creating many image sizes
    so if a website has 600 images with 11 size variations, we have about 11×600 = 6.600 images…
    i think that these images are unnecessary
    so i removed some sizes with remove_image_size( 'image_size_600x800' );

    now i have 4 variations
    thumbnail
    medium
    large
    full

    but now wordpress cant find the “image_size_600x800” size, gives the “full”
    so i want to map the “image_size_600x800” to the “large” size

    any idea?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    What is possible depends on what is still causing the requests for “image_size_600x800”. If it is calls to the_post_thumbnail() or related functions that is causing it, you can use the ‘post_thumbnail_size’ filter to alter which size is requested.

    Thread Starter The Three

    (@3wwwgr)

    @bcworkz

    i found a filter for woocommerce… can i use this for other sizes?

    add_filter( 'woocommerce_thumbnail', function( $size ) { 
        return 'thumbnail'; 
    } );
    Moderator bcworkz

    (@bcworkz)

    I don’t know WooCommerce very well. I’m guessing that sets the pixel size for the registered image size ‘woocommerce_thumbnail’. If so I don’t think it contributes towards your goal. I am quite possibly wrong.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mapping image sizes’ is closed to new replies.