• Resolved nicmare

    (@nicmare)


    I embed images as base64 encoded string in the html-emails. This works great in any email client. But when i take a look into the protocol of wp mail logging and open a sent email, the “data” is removed from the image string. But it’s needed to render the image:

    Is it something what WordPress changed or is it your plugin for some security issues?!

    before: data:image/png;base64,…

    after: image/png;base64,…

Viewing 1 replies (of 1 total)
  • Thread Starter nicmare

    (@nicmare)

    ah never mind. found the reason! it’s wp_kses in line 154 of file EmailLogsTab.php. It filters the data-protocol. To allow it, simply add this code to functions.php:

    add_filter('kses_allowed_protocols', function ($protocols) {
        $protocols[] = 'data';
    
        return $protocols;
    });
Viewing 1 replies (of 1 total)

The topic ‘No support for base64 images?’ is closed to new replies.