WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Woocommerce how to Unset image size (3 posts)

  1. toto
    Member
    Posted 1 year ago #

    Hi how to unset / remove / disable woocommerce image sizes.

    shop_thumbnail, shop_catalog, shop_single?

    Just like here unset( $sizes['large']);

    How to prevent upload of a multiple sizes of images

  2. mikejolley
    Member
    Plugin Author

    Posted 1 year ago #

    http://www.studiograsshopper.ch/code-snippets/remove-wordpress-defaultmedia-image-sizes/ too

    Unset the sizes we add, so thats

    unset( $sizes['shop_thumbnail']);
    unset( $sizes['shop_catalog']);
    unset( $sizes['shop_single']);
  3. atdblog
    Member
    Posted 12 months ago #

    Just found this fix but it isn't working for me. Its giving me strange results. Without the fix my blog used to create 4 files, or 5 if the original image was over 500 pixels wide (don't know why). So when I add this function (verbatim) to my child theme's functions.php file and set all the Media Setting sizes to zero it changes the attachment display settings size dropdown so only a full size option appears. Seems like it worked. However, when I monitor the upload directory I see that it now adds three image files. The original size, "full size" file is 600x521 and is uploaded as "600px-myimagename.svg_.png". A second file was uploaded named "600px-myimagename.svg_-600x198.png" and its cropped (no idea why). And a third file was uploaded and named "600px-myimagename.svg_-500x434.png" and is reduced to 500x434. Its happening with every upload. Is anyone else having the same results?

    I've had my blog since 2006 and I have thousands of unused image files. I'd really like to stop this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic