• Resolved apatheticnow2

    (@apatheticnow2)


    Hi Folks,

    We’re running into an issue where a placeholder images are showing for items that have featured images assigned. The products are PDF’s that are uploaded as downloadble items, and their thumbnails image are automatically generated and stored in the same directory as the PDF product under the woocommerce uploads folder. What’s odd is that the image that is shown on the page is a placeholder, but clicking on the image to load larger version shows the actual image.

    https://www.poweraheadclinical.com/product/eight-tips-for-mental-wellness/

    Looking to see if this is expected logic, and if so how I can hook in to fix it to show the correct image.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi (@apatheticnow2),

    Thank you for reaching out.

    I understand you’re having an issue with your images not displaying as expected. I was able to check your store and could notice that the image seems not to display correctly, but once clicked, another images then displays.

    Furthermore, I’d like to understand, were the images showing correctly before this issue started? If they were, do you remember making any changes before the issue started, such as updating or installing plugin(s)?

    and their thumbnails image are automatically generated and stored in the same directory as the PDF product under the WooCommerce uploads folder.

    Do you use any plugins to achieve this? If you do, please share more details on the plugin in use.

    Looking forward to assisting you further.

    Thread Starter apatheticnow2

    (@apatheticnow2)

    Thanks for following up. The images are generated by PDF Thumbnails Premium?plugin, which is generating images and putting them in the WooCommerce uploads directory. However I’ve confirmed that the issue persists with all plugins except WooCommerce disabled, and WP, my theme (Eduma) and Woo all fully updated. I’m running PHP 8.2.

    This issue has always existed. It is not new. I am able to write custom code to fix this if needed. I’m just looking for guidance on how to hook into something to do so.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello apatheticnow2,

    Thank you for your reply.

    Could you edit a product and show me a screenshot of how the Product Image appears?
    Also as a test, could you set another image from Media Library and see how it works?

    I will be happy yo assist you further, once I have these details.

    Best regards.

    Thread Starter apatheticnow2

    (@apatheticnow2)

    https://ibb.co/vJstGd4

    Here’s an image of the product being edited.

    I have confirmed that if I use an image from the media library that is hosted in the wp-content/uploads/10/ folder work as expected. The issues occurs when the image is uploaded to /wp-content/uploads/woocommerce-uploads/10 that the issue occurs

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @apatheticnow2,

    https://ibb.co/vJstGd4

    I’m afraid I’m unable to see the image from my end.

    I have confirmed that if I use an image from the media library that is hosted in the wp-content/uploads/10/ folder work as expected.?

    However, from your description on the upload folder, it is most likely the plugin PDF Thumbnails Premium?changes the default folders. As an alternative, I recommend moving the images to the folder that works. This should help solve the issue.

    Should you have further issues with this, I recommend reaching out to their support forums here.

    I hope this helps.

    Thread Starter apatheticnow2

    (@apatheticnow2)

    Hi – Can you explain to me why it’s loading the Placeholder image on page load but the actual image when it’s clicked on? Is that expected behaviour for images in this folder? If so is there a hook I can use to change the behaviour?

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    I’ve reviewed the issue on your site and noticed that some product images are displaying correctly, while others are showing placeholder images. This typically happens when product thumbnails don’t generate properly.

    It seems the plugin you’re using to generate thumbnails may not be working as expected. As a test, could you please deactivate the thumbnail generation plugin and try regenerating the thumbnails manually? You can do this by navigating to WooCommerce → Status → Tools, then selecting Regenerate shop thumbnails.

    Once the thumbnails are correctly regenerated, the proper images should appear instead of placeholders.

    To prevent any issues on your live site, I recommend running a conflict test first by following the instructions in this article: How to Test for Plugin and Theme Conflicts.

    Let me know how it goes!

    Thread Starter apatheticnow2

    (@apatheticnow2)

    Hi – The thumbnails are generated correctly for items that are missing thumbnails. For example – I’ve swapped in $image_link in place of $image in this image call, and it works fine. Is there a woocommerce filter that is swapping in that the placeholder that I can possible hook into and change?

    See below where I have commented out the image link and replaced image with image_link – this fixes the issue on the product page, but I would ideally hook in and fix it everywhere instead of modifying a ton of woocommerce files.

    $product_thumbnail = '';

    if ( $product->get_image_id() ) {

    $image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) );

    $image_link = wp_get_attachment_url( get_post_thumbnail_id() );

    $image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array(

    'title' => $image_title

    ) );

    $product_thumbnail = apply_filters( 'woocommerce_single_product_image_html', sprintf(

    //'<a href="%s" class="thim-image-popup" title="%s" data-elementor-open-lightbox="no">%s</a>', esc_url( $image_link ), esc_attr( $image_title ), $image ), $post->ID );

    '<a href="%s" class="thim-image-popupBAR" title="%s" data-elementor-open-lightbox="no"><image src="%s"></a>', esc_url( $image_link ), esc_attr( $image_title ), esc_url( $image_link ) ), $post->ID );

    }
    Thread Starter apatheticnow2

    (@apatheticnow2)

    I should also mention that all images work perfectly fine for logged in admin users, but do not work for logged out users.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello apatheticnow2,

    Thank you for your reply.

    I would like to highlight this message from the last replies.

    The images are generated by PDF Thumbnails Premium plugin, which is generating images and putting them in the WooCommerce uploads directory.

    I suspect the issue is caused by the method that generates the images and stores them in the WooCommerce uploads directory. Therefore, it would be best to contact PDF Thumbnails Premium plugin support and ask them about this issue.

    Please let me know once you get a reply from the PDF Thumbnails Premium support.
    I will be happy to help you resolve this issue.

    Best regards.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.