Support » Plugin: WooCommerce » Preventing image products from generating thumbnails

  • Resolved davexmit

    (@davexmit)


    Hello,

    I’m selling stock photos, so I need to upload the high-res photos using the product file upload/link feature. But wordpress/wc is generating unnecessary thumbnails for these files, using valuable storage. Is there a way to prevent thumbnail generation for digital products?

    Note: I use a watermarked version of the image as a product image.

    Thanks in advance.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Ahir Hemant

    (@hemant-ahir)

    Hi @davexmit

    Login To Your WP Dashboard.
    Go to Settings and then, Media.
    Here you will find 3 various image sizes: thumbnail, medium, large. Decide which image sizes you won’t be using and then set those sizes to 0.
    Update and save your new settings.

    Or other way is

    function add_image_insert_override($sizes){
        unset( $sizes['thumbnail']);
        unset( $sizes['medium']);
        unset( $sizes['large']);
        return $sizes;
    }
    add_filter('intermediate_image_sizes_advanced', 'add_image_insert_override' );

    Add above code in your active theme’s functions.php

    Thanks
    Ahir

    dakini2

    (@dakini2)

    Hi Guys, I have a similar issue and question. I would like to stop WooCommerce from generating different thumbnails in my shop. Sample product page is: Róża wiatrów na ścianę

    How do I do it?

    • This reply was modified 9 months ago by dakini2.
    Plugin Support Margaret S. woo-hc

    (@margaretwporg)

    Hi @davexmit

    The pointer from @hemant-ahir should take care of the requirement. You can also refer to this guide if required.

    Hi @dakini2

    If the same solution doesn’t solve your problem, then feel free to open a new thread.

    Thanks

    Thread Starter davexmit

    (@davexmit)

    @hemant-ahir

    Sorry, I knew I may not be able to explain my problem clearly enough. I don’t want to turn off thumbnail generation globally, only for file uploads for digital products to the woocommerce upload directory.

    So the product itself is a photo uploaded to the woocommerce upload directory via the ‘add file’ method in the product creation admin. This photo does not need any thumbnails because it will never be seen front end. It’s just a product that happens to be a photo.

    Does that make more sense?

    Ahir Hemant

    (@hemant-ahir)

    Hi @davexmit
    Yes understood !

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    for This you need to handle media before upload that means need to verify that uploaded file from Digital Products. it’s possible but need to do custom code to achieve.

    Thanks
    Ahir Hemant

    Thread Starter davexmit

    (@davexmit)

    @hemant-ahir

    I thought that may be the case. I do have the aptitude to delve into this, but was hoping a solution already existed as my time is better spent on the business side of the store. But thank you very much for your time, much appreciated sir.

    Plugin Support Margaret S. woo-hc

    (@margaretwporg)

    Hi @davexmit

    You might want to get custom code help for this. For assistance with customization or development with your site, you can reach out to someone on our customizations page.

    Thread Starter davexmit

    (@davexmit)

    Thanks @margaretwporg, I may well do that.

    @margaretwporg – I managed to solve the problem using your tip! Thank you!

    Plugin Support Margaret S. woo-hc

    (@margaretwporg)

    Glad to hear it – thanks for letting us know!

    Feel free to create a new thread for any other questions you might need help with.

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Preventing image products from generating thumbnails’ is closed to new replies.