Created
January 26, 2022 13:53
-
-
Save DominikStyp/4b309d5104c51a9434db463db9fe1e4d to your computer and use it in GitHub Desktop.
Laravel 7: Embedding images in emails (wors for Gmail too)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img | |
src="{{ $message->embed( public_path('images/my-logo.png') ) }}" | |
alt="{{ env('APP_FRONT_URL') }}" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Laravel Inline Attachments make it possible to embed image using
$message
variable inside Blade view. This approachAs we can see in the email source, image is treated as attachment to the source
and the image is converted to: