• I like the swap image function on shop page in Astra. However it seems the swapped image is the original size not the 300×300 thumbnail size, which increases page load times when hovering over the product images. https://snipboard.io/j7BnpO.jpg

    I’m also unsure how the Variation Swatches for WooCommerce relate to the image swap in this case. Could there be any conflicts?

    Any help is appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @wonderwooman,

    I am able to replicate this on my end and forwarded this to our developers. I will share the update on this thread once I have anything to share.

    Kind regards,
    Aradhy

    Hi @wonderwooman,

    Our developers have taken this into their to-do list and will soon add this to future updates. Since the process involves testing and modifying the core code, it is difficult to provide an exact date. However, you can use the following custom filter to resolve this as a workaround:

    /**
     * Custom function to set the thumbnail size for product archives.
     *
     * @return string The name of the thumbnail size to use.
     */
    function custom_product_archive_hover_thumbnail_size() {
    	return 'woocommerce_thumbnail';
    }
    
    add_filter( 'single_product_archive_thumbnail_size', 'custom_product_archive_hover_thumbnail_size' );

    Please add it to the functions.php file of the child theme. For the detailed steps, check out this documentation. [Link to Documentation]

    Hope this helps.

    Kind regard,
    Aradhy

    Thread Starter wonderwooman

    (@wonderwooman)

    Thank you @bsfaradhy , the code works well.

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