Home / Forums / Basel support forum / Thumbnail issue on WC mails
Home › Forums › Basel support forum › Thumbnail issue on WC mails
Thumbnail issue on WC mails
- This topic has 35 replies, 2 voices, and was last updated 6 years, 2 months ago by
Artem Temos.
-
AuthorPosts
-
December 8, 2018 at 9:25 am #94716
GiulioParticipantHi there, after last Basel update (with last WC version) our thumbnails inside WooCommerce mails are corrupted. There is something wrong with this:
<img width=”70″ height=”70″
src=”image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gODIK/9sAQwAGBAQFBAQGBQUFBgYGBwkOCQkICAkSDQ0KDhUSFhYVEhQUFxohHBcYHxkUFB0nHR8iIyUlJRYcKSwoJCshJCUk/9sAQwEGBgYJCAkRCQkRJBgUGCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQk/8AAEQgACgAKAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A+oJ5mjuYwGG08Fcdf1qzUMkaNMrMilh0JHNTUkB//9k=”
class=”attachment-70×70 size-70×70 basel-lazy-load
basel-lazy-fade” alt=”Puro Talco profumo di nicchia di
Officina delle Essenze” style=”border-radius: 3px; padding:
0; margin: 0;”>I took this from a source code of a mail. Could you please give us a suggestion? Thanks a lot.
December 8, 2018 at 9:48 am #94718Hi,
There is no image in WooCommerce emails by default. How did you add it there?
Regards
December 8, 2018 at 9:51 am #94719
GiulioParticipantWe always used a plugin called Email Customizer. And it always worked with WooCommerce.
December 8, 2018 at 10:04 am #94724It seems to be a conflict of this plugin with our lazy loading feature. We will try to find a workaround in our next theme update.
December 8, 2018 at 11:47 am #94737
GiulioParticipantPlease could you suggest me a workaround also without the update? We’re receiving many orders and all our E-Mails are without thumbnails.
December 9, 2018 at 11:18 am #94925Sorry, but there is no a quick fix for this. We will need more time to investigate the plugin functionality and try to find a fix.
December 9, 2018 at 6:30 pm #94984
GiulioParticipantDamn 😕 With the previous Basel version it worked. Do you think that I could fix it temporarily with the exchanging the a php file?
December 10, 2018 at 7:26 am #95038Most likely, you didn’t use the lazy loading before since we didn’t change anything with it.
December 10, 2018 at 7:35 am #95044What plugin do you use to add the thumbnail? Please, send us a link.
December 10, 2018 at 7:40 am #95048December 10, 2018 at 9:18 am #95077Try to add the following PHP code snippet to the child theme functions.php file to fix this
function basel_lazy_loading_init( $force_init ) { if ( ( ( ! basel_get_opt( 'lazy_loading' ) || is_admin() ) && ! $force_init ) ) { return; } // Used for product categories images for example. add_filter('basel_attachment', 'basel_lazy_attachment_replace', 10, 3); // Used for instagram images. add_filter('basel_image', 'basel_lazy_image_standard', 10, 1); // Used for avatar images. add_filter( 'get_avatar', 'basel_lazy_avatar_image', 10 ); // Images generated by WPBakery functions add_filter('vc_wpb_getimagesize', 'basel_lazy_image', 10, 3); // Products, blog, a lot of other standard wordpress images add_filter('wp_get_attachment_image_attributes', 'basel_lazy_attributes', 10, 3); } add_action( 'init', 'basel_lazy_loading_init', 120 ); function basel_lazy_loading_deinit( $force_deinit = false ) { if ( basel_get_opt( 'lazy_loading' ) && ! $force_deinit ) { return; } remove_filter( 'basel_attachment', 'basel_lazy_attachment_replace', 10, 3) ; remove_filter( 'get_avatar', 'basel_lazy_avatar_image', 10 ); remove_filter( 'basel_image', 'basel_lazy_image_standard', 10, 1 ); remove_filter( 'vc_wpb_getimagesize', 'basel_lazy_image', 10, 3 ); remove_filter( 'wp_get_attachment_image_attributes', 'basel_lazy_attributes', 10, 3 ); } add_action( 'woocommerce_email_before_order_table', function(){ basel_lazy_loading_deinit(true); }, 20 ); add_action( 'woocommerce_email_after_order_table', function(){ basel_lazy_loading_init(true); }, 20 );December 10, 2018 at 9:25 am #95079
GiulioParticipantI tried to active the snippet, but Code Snippet plugin stop the activation. Maybe something miss to complete the snippet? It prevented an error 500.
December 10, 2018 at 10:23 am #95093Where did you place the code? Could you please send us a screenshot?
December 10, 2018 at 11:10 am #95109
GiulioParticipantThe code is exactly that one that you pasted to me.
December 10, 2018 at 12:07 pm #95131Which PHP version do you use on your server? Please, check also PHP error logs and send us this error.
December 10, 2018 at 12:31 pm #95138
GiulioParticipantWe’re using the 7.2 of PHP. Is it compatible? The error log is empty on the server and also on FTP. The Siteground support told us that it is probably an issue related to php version. What do you think about it?
December 10, 2018 at 2:18 pm #95181Yes, the code works fine with PHP 7.2. Could you try to add it directly to the child theme functions.php file via FTP?
December 10, 2018 at 2:23 pm #95185
GiulioParticipantDone. The web site works! I’ll wait for another order to let you know something.
December 10, 2018 at 3:47 pm #95217OK, waiting for further information.
December 10, 2018 at 6:48 pm #95239
GiulioParticipantHey, it’s working again! We’re happy. Do you will insert the snippet inside the next Basel version?
December 11, 2018 at 7:05 am #95319Watch our changelog. We will try to fix this in our theme core.
January 15, 2020 at 3:25 pm #168143
GiulioParticipantHello there again! We have the same issue, this time not with Basel, but WoodMart. How can we fix it in this case? Please take a look to the screenshots. Thanks!
January 16, 2020 at 7:04 am #168255Hello,
Yes, you the same code but replace all
baselprefixes withwoodmart.Kind Regards
January 16, 2020 at 12:49 pm #168353
GiulioParticipantThanks a lot. We’re testing your advice.
March 30, 2020 at 3:13 pm #183407
GiulioParticipantHello,
I re-open this ticket because it is the same thread, but 2 years after. For a period of time we did not use Basel lazy load – preferring WP-Rocket lazy load – but now we’re starting again, because we moved to a Litespeed server.
So with Basel we’re having new issues with the lazy load and some follow up mails from WooCommerce Follow Ups plugin. In the screenshot below you can see that our customers can’t see anymore the thumbnails. Take also a look to the related source code please.
The fix could be try to exclude the lazy load from there?
Thanks a lot.
March 31, 2020 at 6:12 am #183484Hello,
Does it happen with the plugin’s emails only? Please, check how standard WooCommerce emails work.
Kind Regards
March 31, 2020 at 7:29 am #183498
GiulioParticipantIt happen also without the plugin that customize the CSS of the WooCommerce mails 😕
March 31, 2020 at 9:51 am #183540Have you added the code to the child theme? https://xtemos.com/forums/topic/thumbnail-issue-on-wc-mails/#post-95077
Please, send us a screenshot. Also, be sure that you are running the latest version of the theme.March 31, 2020 at 5:08 pm #183670
GiulioParticipantThe theme is running with the last version, so please don’t worry about that.
Just one question: if I see well the snippet do more than what we need. Our issues is related only to the lazy load with product images that appears on the follow ups mails.
Could you tell us the specific code for our case? Thanks.
April 1, 2020 at 6:29 am #183727Do you mean that it happen with the plugin’s emails only? Have you tested how standard WooCommerce emails work? (like new order)
-
AuthorPosts
- You must be logged in to create new topics. Login / Register