question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do not embed images in Base64

See original GitHub issue

AFAIS, if the html.ejs template includes a <img src="https://foo.com/image.png">, it happens that email-templates converts it to Base64 within the email HTML body.

  • Is this the expected behaviour?
  • If so, can it be disabled? Many email clients do not display Base64 images (such as Gmail).

Thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9

github_iconTop GitHub Comments

4reactions
ibccommented, May 31, 2018

Actually you can add data-inline-ignore attribute within the corresponding <img> tag, or you can disable it globally by setting:

{
  juice: {
    webResources: {
      images : false
    } 
 }
}

Check https://www.npmjs.com/package/juice API, specifically the webResources setting which points to https://www.npmjs.com/package/web-resource-inliner

0reactions
niftylettucecommented, Jul 31, 2018

Done @ibc!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to avoid problems with base64 images
Learn why using base64-encoded images in your client-side signatures is not a good idea, and why you should use embedded images instead.
Read more >
Should I embed images as data/base64 in CSS or HTML
i know that gzipping compressed images is not the way to go. But i was thinking that maybe its more effective on the...
Read more >
Do not embed images in Base64 · Issue #303
Finally it was possible to disable Base64 image encoding by setting some configuration options in juice . All reactions.
Read more >
Embedding Images in Power BI using Base64
Embedding Images in Power BI using Base64 · 1) Choose the image that you want and use any Image to Base64 converter to...
Read more >
Embedding Images in HTML with Data URI & Base64 Encoding
The short explanation is that you base64 encode the image (or other resource) and then use a data URI to provide access to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found