Add Product Image to Order Confirmation Mail
-
Hi, I used to display the product image thumbnail of the ordered items in the order confirmation mails by use of a snippet in the functions.php. For example:
function sww_add_photos_to_wc_emails( $args ) {
$args[‘show_image’] = true;
$args[‘image_size’] = array( 100, 100 );
return $args;
}
add_filter( ‘woocommerce_email_order_items_args’, ‘sww_add_photos_to_wc_emails’ );
With this snippet, the space of 100x100px is displayed in the confirmation email, but no image.
I tried several different snippets, also the snippet recommended by wordpress.org but none is working.
I was using the Avada theme before and here it was working fine.
Hello,
Could you please try to disable the lazy loading option in Theme Settings -> Performance and test how it works?
Kind Regards
Thank you. I tested it with the disabled lazy loading and it is working. Do I have to decide between the lazy loading and an image in the order mails or is there a solution for it?
Please, send us your admin and FTP access so we can check and try to fix it.
Kind Regards
Thank you, below the access data.
Regards
Hello,
We don’t see the problem with images in order confirmation emails now https://gyazo.com/dd9be1cf6c93762ced8674724a2daa9e
Could you please clarify how to reproduce the issue?
Kind Regards
Hello,
yes it seems to work now… the only difference I see between your code and the snippet I used are the quotation marks… You used [‘show_image’] instead of [‘show_image’].
We are glad that you sorted it out. Feel free to contact us if you have any further questions.
The topic ‘Add Product Image to Order Confirmation Mail’ is closed to new replies.