• Resolved JapeNZ

    (@japenz)


    Hi there,
    Images show up in the customizer but not in the actual emails.
    I’ve tried deactivating Jetpack lazy load but it doesn’t seem to make any difference.
    I just updated WordPress to 5.4, not sure if this is the cause.

    Any suggestions on how to fix the problem would be very much appreciated, let me know any information you need ??

    Kind regards,
    JP

Viewing 14 replies - 1 through 14 (of 14 total)
  • hannah

    (@hannahritner)

    Hi @japenz,
    Are you seeing a placeholder where the image should be? Could you send a screenshot? https://imgbb.com/
    Thanks!

    Hannah

    Having the same issue. header image and product image appear in the admin, but they don’t appear in the actual email receipt.

    https://ibb.co/QvWQ0gM

    Thread Starter JapeNZ

    (@japenz)

    Hi @hannahritner,

    Thank you for getting back to me ??

    No placeholder, here are the screenshots:

    Images in customizer: https://ibb.co/dpHP8wd

    Images in Gmail: https://ibb.co/hXh4Bv4

    Let me know if you need any other info ??

    Kind regards,
    JP

    hannah

    (@hannahritner)

    Thanks for the screenshots! I’ll send this over to the developer to see what insight he has as I’m not able to duplicate this.
    Appreciate your patience!

    Hannah

    Hey,
    Is your website publically accessible and using https?

    Ben

    Thread Starter JapeNZ

    (@japenz)

    Hi @britner,
    Thank you for getting back to me ??

    Yes to both, here’s the website:

    https://www.comicbookshop.co.nz/

    Thanks for your help with this, any suggestions would be very much appreciated!

    Kind regards,
    JP

    • This reply was modified 4 years, 11 months ago by JapeNZ.

    @japenz

    the way your image shows that not even a broken image is trying to load that makes me think you have something overriding the template and so the image isn’t even part of the email.

    I suggest you try activating a standard theme and deactivating extra plugins just as a test and sending an email to yourself.

    Ben

    Thread Starter JapeNZ

    (@japenz)

    Hi @britner

    Spot on mate!
    I just tried with the Twenty Twenty theme active and the email went through without any trouble ??

    I then tried my current theme (CyberChimps Responsive) and it went through as well.
    So the issue was with my child theme.

    The culprit was the code I was using to edit the size of the images:

    // Set Woocommerce Email Customizer image size 
    function custom_wc_order_email_images_args( $args ) {
    $args['image_size'] = array( 72, 72 );
    return $args;
    }
    add_filter( 'woocommerce_email_order_items_args', 'custom_wc_order_email_images_args', 20 );

    With this removed the images display correctly, any suggestions on a alternative way to set the image size?

    Thanks for your help buddy!

    Kind regards,
    JP

    • This reply was modified 4 years, 11 months ago by JapeNZ.

    I don’t see any reason that code would have an error?

    Ben

    Thread Starter JapeNZ

    (@japenz)

    Hi @britner
    Yeah I can’t work it out either haha!

    I’ve double checked and with the code disabled emails images come through, with the code enabled they don’t… very strange, but by no means the end of the world.

    Happy to stick with the default size.

    Thanks for your help!

    Kind regards,
    JP

    Try setting it to woocommerce_thumbnail

    For example:

    add_filter( 'woocommerce_email_order_items_args', 'custom_wc_email_image_size', 30 );
    function custom_wc_email_image_size( $args ) {
    $args['image_size'] = 'woocommerce_thumbnail';
    return $args;
    }

    Ben

    Thread Starter JapeNZ

    (@japenz)

    Hi @britner
    I’m assuming doing this would display the full size woocommerce thumbnail rather than displaying at a custom size though right?

    I’d prefer to stick with the default 50×50 rather than use the 160×160 woo thumb.

    If you’re able to add an option for custom sizes in the plugin I’ll certainly take a look at it again, but I’m happy to stick with the default.

    Kind regards,
    JP

    It would, but I was more curious if your custom size was creating your issue vs it being something you leave in. If I add size settings to the plugin they would use that same filter.

    Ben

    Thread Starter JapeNZ

    (@japenz)

    Hi @britner
    Good point, I was working on the assumption that as removing the code fixed the issue it must have been the code causing the error.
    I guess it’s certainly possible the code was just conflicting with something else that’s causing the issue… especially as you’re certain there’s nothing wrong with the code.

    I’ll do some additional testing on a staging area and see what I can find.

    Kind regards,
    JP

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Images not displaying in emails’ is closed to new replies.