Image is not rendering in email

Asked

Viewed 93 times

0

I am sending email with Aravel, the image img src that I send by email is sent by frontend:

When uploading an image the image variable src is assigned to the image:

handleInputChange(e) {
  var file = e.dataTransfer ? e.dataTransfer.files[0] : e.target.files[0];
  var pattern = /image-*/;
  var reader = new FileReader();
  reader.onload = this._handleReaderLoaded.bind(this);
  reader.readAsDataURL(file);
}

    _handleReaderLoaded(e) {
      let reader = e.target;
      this.imageSrc = reader.result;
    }

So I have a view:

<html lang="pt-br">
<head>
    <meta charset="utf-8"/>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
</head>
<body>
   <img src="{{$foto}}" />
</body>
</html>

The problem is that it has image rendering and other images not.

I checked the website https://codebeautify.org/base64-to-image-converter paste the imagesrc that arrives in the email, render on that site, but in outlook and gmail does not show the image in the email.

This is the image src that I try to show in the email:

https://pastebin.com/3srKwRyw

  • You have to use it like this: https://laravel.com/docs/5.1/mail#inline-attachments attachments

  • related: https://answall.com/questions/234416/laravel-5-4-enviar-email-com-txt-em-annexe

  • You need to set the actual image path on the server to appear in the email body

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.