• Resolved mandeelectrical

    (@mandeelectrical)


    hi im having an issue with my images showing up in emails. I’ve read in other threads that the issue is caused my lazy load. We use autoptimize to do lazy loading, i have contacted them and they have come back with this reply. could you help please?

    Link to the ticket is here https://wordpress.org/support/topic/disable-lazy-load-for-plugin

    They’re reply is as follows:

    AO works based on the HTML it gets, at that point there is no way of tracing back what plugin(s) generated said HTML. If Kadence has a conditional tag to identify a request as being generated by it, then we can disable AO based on that. Examples of WooCommerce conditionals are e.g. is_product, is_cart, is_checkout, … (many more here)

    So ask Kadence support if they have such a conditional and I can provide you a code snippet to disable AO if that conditional is true.

Viewing 10 replies - 1 through 10 (of 10 total)
  • It’s not related to this plugin, woocommerce has always allowed images to be shown in the emails through a simple filter in the settings. This plugin isn’t changing how that works or doing something unique.

    The point being if your lazy load is effecting the emails it’s effecting woocommerce core emails not because of this plugin. If you turned this plugin off and added the filter to have images show in your emails the effect would be the same.

    So it’s not something around our code that a lazy load would need to look into but the core woocommerce code.

    All that said why do you believe this is related to lazy load? Did you test and your images work if you turn off the plugin?

    Ben

    Thread Starter mandeelectrical

    (@mandeelectrical)

    Hi,

    I couldn’t find the setting to turn on images in WooCommerce core emails. Could you possibly direct me to that?

    On some of the other topic threads you’re support has said numerous times that lazy load can affect the images showing up in emails.

    The images load in the customiser but don’t load when the emails are actually sent. Both product images and social icons do not show

    Hey!

    I couldn’t find the setting to turn on images in WooCommerce core emails. Could you possibly direct me to that?

    Sorry I wasn’t clear:

    by a filter, I mean a filter function.

    add_filter( 'woocommerce_email_order_items_args', 'example_email_order_items_args', 10, 1 );
    function example_email_order_items_args( $args ) {
    
        $args['show_image'] = true;
    
        return $args;
    
    }

    The point is the variable for “show_image” is set to true. The actual output of the image is part of woocommerce core.

    On some of the other topic threads you’re support has said numerous times that lazy load can affect the images showing up in emails.

    It can, it’s been reported. But it’s not the most common reason or the only reason so it’s worth testing and not assuming it is the reason.

    The most common is that people have their sites behind a coming soon so their images are not publicly accessible. Another is that the images are not served through https. Another is that some email inboxes have image show or hide settings and they had their own settings set to hide.

    The images load in the customizer but don’t load when the emails are actually sent. Both product images and social icons do not show

    This could be true for the other reasons I outlined as well as more that I didn’t.

    Can you start by following this list:

    1. Is your site publicly accessible?
    2. Are you using HTTPS?
    3. Test by deactivating plugins (like lazy load plugins and others).
    4. If deactivating plugins doesn’t help inspect the emails you received and get the image src link. If that link when placed in your browser takes you to an image then you likely have a setting in your email inbox that needs to change. If it doesn’t take you to an image post it here so I can see and offer some suggestions.

    I hope that helps!

    Ben

    Thread Starter mandeelectrical

    (@mandeelectrical)

    thank for your reply. the images are publicly available and yes they are being served over https. i have tried deactivating all plugins apart from your’s and woocommerce and the images still do now show.

    the image source is coming up as – “https://allaboutsheffield.co.uk/wp-content/uploads/2020/04/black-over-the-shoulder-bag-1-free-img-1-150×150.jpg”

    putting that url in the browser brings the image up however in the emails i get a red cross and a note saying “the linked imag…” (unfortunately i cannot see the entire message)

    I do have a coming soon page but this is not yet activated. however i do need to activate this soon as we are nearly ready for launch

    Hey,
    If you inspect that line where you see “the linked imag…” can you see what the rest of the notice says?

    What email inbox are you viewing in?

    Ben

    Thread Starter mandeelectrical

    (@mandeelectrical)

    that is microsoft outlook but ive also tried it on gmail and hotmail too. all images are getting hidden including the social icons.

    to get the image source i had to click view in browser. on the inspect element this is what it says:

    <IMG title=Home class="attachment-100x50 size-100x50" style="BORDER-TOP-STYLE: none; FONT-SIZE: 14px; TEXT-DECORATION: none; BORDER-LEFT-STYLE: none; HEIGHT: auto; BORDER-BOTTOM-STYLE: none; TEXT-TRANSFORM: capitalize; FLOAT: left; FONT-WEIGHT: bold; PADDING-BOTTOM: 0px; BORDER-RIGHT-STYLE: none; OUTLINE-STYLE: none; DISPLAY: block; LINE-HEIGHT: 24px; PADDING-RIGHT: 10px" alt=Home src="https://allaboutsheffield.co.uk/wp-content/uploads/2020/04/black-over-the-shoulder-bag-1-free-img-1-150x150.jpg" width=50 height=50>

    Well, based on that I can confirm this is not a lazyloading issue as the image URL is there in the src attribute (instead of some placeholder) and the class attribute does not contain lazyload.

    If you inspect that line where you see “the linked imag…” can you see what the rest of the notice says?

    Nothing on that?

    My best guess for you at this point is that your emails are not ranking high enough (they look enough like spam) that your inboxes are blocking the files for that reason.

    Some things you can do to help is to make sure you are using an SMTP server with a reputable IP address. See: https://wordpress.org/plugins/wp-mail-smtp/

    Ben

    Thread Starter mandeelectrical

    (@mandeelectrical)

    thanks for your help. i have now solved this issue. i had enabled hotlink protection in cloudflare and also in my htaccess file. i have now disabled this and the images now show for the emails. im really sorry, i totally forgot i had enabled this.

    thanks again

    Thanks for the update,

    Ben

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘email images’ is closed to new replies.