• Hello. After adding code obtained from the Woo Wiki to the functions.php file, thumbnails are still being generated.

    add_filter( 'woocommerce_background_image_regeneration', '__return_false' );

    I do not want thumbnails created after uploading image files. Can you please help?

Viewing 4 replies - 1 through 4 (of 4 total)
  • are you put the code inside the init action?

    • This reply was modified 5 years, 2 months ago by wprock.
    Thread Starter born2excite

    (@born2excite)

    I entered the code exactly like this:

    add_filter( 'woocommerce_background_image_regeneration', '__return_false' );

    I do not know what “inside the init action” means, sorry.

    I am talking this

    add_action( 'init', 'paulc_disable_image_regeneration_process' );
    function paulc_disable_image_regeneration_process() {
       add_filter( 'woocommerce_background_image_regeneration', '__return_false' );
    }
    Thread Starter born2excite

    (@born2excite)

    Code v1
    added to functionality plugin, nothing happened, thumbnails still regenerated.
    added to theme functions.php file, nothing happened, thumbnails still regenerated.

    add_filter( 'woocommerce_background_image_regeneration', '__return_false' );

    Code v2:
    added to functionality plugin: nothing happened, thumbnails still regenerated.
    added to theme functions.php file, crashed site, white screen on WP admin and site

    add_action( 'init', 'paulc_disable_image_regeneration_process' );
    function paulc_disable_image_regeneration_process() {
       add_filter( 'woocommerce_background_image_regeneration', '__return_false' );
    }

    Server Information
    Apache Version: 2.4.41
    PHP Version: 5.6.40

    Website
    PHP version: 7.3

    Thanks for trying to help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable Thumbnail Regeneration not working’ is closed to new replies.