Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter PingZoo

    (@wpradio)

    Well sorry, I have to say: I don’t want to show the woocommerce-placeholder.png
    I would like to see “normal” thumbnails, if the downloadable file is an image.

    When I upload the downloadable product to my regular wordpress media library first, before I choose it as a downloadable product, the thumbnail is displayed normally.

    I’ve also tried it with a clean installation of WooCommerce on Astra = Same Behaviour

    Maybe someone knows how to achieve this? ??

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ??

    I’ve run a test on my end, and it worked just fine for me. It sounds like this issue is caused by a conflict with your theme or with another plugin.
    ?
    The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    Before you start

    First, please make sure you have a good backup in place of your full site and database. Most hosting companies have this included in the subscription, but you could also consider using a service like?Jetpack. If something goes wrong, it’s nice to know that you can restore your site.

    Second, I would suggest installing a plugin called?Health Check & Troubleshooting. This is a plugin developed by the WordPress community and it allows you to disable plugins without affecting your current site visitors.

    I hope that helps! ??

    Thread Starter PingZoo

    (@wpradio)

    Hey Gabriel,

    thank you for you fast reply!
    I hope I didn’t confuse you with my bad english -.-

    I’ve installed a second WP + WC on a second server, to test it on a “clean” installation, but there i have the same issue.

    Installed and activated theme: Storefront
    https://shopstage.pingzoo.de/wp-content/uploads/2021/05/shop_themes.png

    Installed and activated Plugin: WooCommerce
    https://shopstage.pingzoo.de/wp-content/uploads/2021/05/plugins.png

    Uploading a “featured image” for the product: works like it did before
    https://shopstage.pingzoo.de/wp-content/uploads/2021/05/product_featured_image.png

    Uploading downloadable file: generates this placeholder instead of a real thumbnail
    Step 1: https://shopstage.pingzoo.de/wp-content/uploads/2021/05/add_download_1.png
    Result: https://shopstage.pingzoo.de/wp-content/uploads/2021/05/add_download_2.png

    IF I upload the downloadable product first directly to the media library from WP dashboard or as a featured image within the product and choose this file afterwards to be the downloadable product, everything works fine.

    Are we talking about the same or am I getting anything wrong?

    Greetings
    Felix ??

    • This reply was modified 3 years, 6 months ago by PingZoo.
    Thread Starter PingZoo

    (@wpradio)

    Hey again,

    I have now tested it with 5 of my customers, with different hosters. The behavior is the same for all installations.

    Maybe that’s even wanted that way?
    But the clarity suffers a lot. Especially since you can’t call up the pictures via the direct link, because they shouldn’t be accessible to everyone.

    I am already looking forward to your answer ??

    Plugin Support B C. a11n

    (@battouly)

    Hi @wpradio,

    Thanks for the details. I am able to replicate this on my local test site. It looks like this is an expected behavior as the file is expected to be only accessible upon purchase, but I’ll double-check with the developers to confirm this.

    I’ll be back once I have something to share.

    Thread Starter PingZoo

    (@wpradio)

    That sounds great. Thank you for your time!

    I just want to add something:

    That would mean that it would be very confusing for me and my vendors, because we can no longer properly overlook what we have uploaded.

    I think as an admin or vendor who uploads the product himself, you should keep an overview and at least be able to see the thumbnails. After all, I created the downloadable content myself.

    However, if it is really wanted, can you give me a hint where to find this function in the WooCommerce code, or if there is a filter hook or a template in which I can create it myself?

    At this moment I’m thinking about using the action hook media_upload_file, to generate the thumbnails myself.

    But I would love to heare from you with some better news xD

    Plugin Support B C. a11n

    (@battouly)

    Hi Felix,

    I have an update on this.

    Technically, yes, that’s on purpose, I guess for security purposes.

    But they agree with what you said in the thread above: that’s overkill, the site admin at least should be able to see all the images in the media library no matter what. Also even when you remove the download from the product, the image is still not visible.

    Anyway, this snippet can be used as a workaround, it will make all images visible in the media library (for everyone, so if security is a concern, use with care!)

    add_filter( 'wp_prepare_attachment_for_js', function($response) {
    	if ( isset( $response['url'] ) && isset( $response['full'] ) ) {
    		$response['full']['url'] = $response['url'];
    		if ( isset( $response['sizes'] ) ) {
    			foreach ( $response['sizes'] as $size => $value ) {
    				$response['sizes'][ $size ]['url'] = $response['url'];
    			}
    		}
    	}
    	return $response;
    } ,999, 1);

    You can use a plugin like Code Snippets to add the code.

    I hope this helps!

    Thread Starter PingZoo

    (@wpradio)

    Hey @battouly,

    thank you very much! ??
    But now I’m getting a 403 for every image, because the media library tries to load the original images from woocommerce_upload as thumbnails.
    The original images are 15-30MB each, and they are protected by the .htaccess-file ??

    Any other idea?

    Plugin Support B C. a11n

    (@battouly)

    Hey @wpradio,

    Sorry for the delay.

    I’ll take a look at this and update you via the thread soon.

    Thanks.

    Plugin Support B C. a11n

    (@battouly)

    Hey @wpradio,

    Just an update that I have created a new issue for the developers to look into this.

    Here: https://github.com/woocommerce/woocommerce/issues/29988

    You can keep track of the progress from the issue above.

    Best!

    Thread Starter PingZoo

    (@wpradio)

    Hey @battouly

    Thanks for your regular updates.
    I feel very well taken care of and thank you and your team for your efforts!

    I will be watching the github issue.

    All the best.
    Felix

    AJ a11n

    (@amandasjackson)

    Hi @wpradio

    I feel very well taken care of and thank you and your team for your efforts!

    I will be watching the github issue.

    You are quite welcome!

    I’ll mark this thread as resolved now that there is an open issue on GitHub.

    If you have any further questions, I recommend creating a new thread.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Thumbnails of downloadable product’ is closed to new replies.