• diquispe

    (@diquispe)


    I have hundreds of images and since the update of WordPress 5.3 I added 3 additional image sizes that I consider unnecessary, one of them creates a copy of the larger image with the suffix “-scaled.jpg” and two others.

    1536×1536: 1536×1536 pixels (proportionally resized to fit inside dimensions)
    2048×2048: 2048×2048 pixels (proportionally resized to fit inside dimensions)

    Currently there is a temporary solution adding this line in the functions.php

    add_filter( ‘big_image_size_threshold’, ‘__return_false’ );

    (and regenerating the images again) but we need to remove this wordpress function that creates more image sizes we do not need and adds weight to the web page

    • This topic was modified 5 years ago by Jan Dembowski. Reason: Deleted link to translator
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Side note @diquispe Please do not include “Translated with <LINK>” in your posts. That’s basically link spam and that is not allowed here.

    If the translator site requires that then please use a different machine translator. The links are not for these forums.

    Thread Starter diquispe

    (@diquispe)

    Any idea? Se have yo remover theese images with a Hook ?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    The scaled image is only added if the image exceeds the size threshhold, which means it is bigger than 2560 pixels on a side. These extremely large images get scaled down to be smaller.

    This is described in more detail here: https://make.www.ads-software.com/core/2019/10/09/introducing-handling-of-big-images-in-wordpress-5-3/

    If you want to disable big image handling, then you have posted the correct filter to use already. There is also a plugin specifically for this purpose: https://www.ads-software.com/plugins/disable-big-image-threshold/

    After testing is seems the filter only fixes the scaled image creation.
    add_filter( ‘big_image_size_threshold’, ‘__return_false’ );

    I also needed to unset the 2x medium-large and 2x large sizes to prevent them from being created.

    function filter_image_sizes( $sizes) {
    	unset( $sizes['1536x1536']); // disable 2x medium-large size
    	unset( $sizes['2048x2048']); // disable 2x large size
    	return $sizes;
    }
    add_filter('intermediate_image_sizes_advanced', 'filter_image_sizes');
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘“-scaled.jpg” innecesary sufix and added 2 image sizes’ is closed to new replies.