Add your own logo to Laravel Mail
Amending the template is easy to add your logo to the mail header
The mail template will already automatically add your application name to the mail template, but if you want to display your own logo?
Publish the email stubs
Run the command php artisan vendor:publish --tag=laravel-mail
This will copy the email layout stubs to the folder /resources/views/vendor/mail/html
Edit the header.blade.php file.
To start with the template looks like;
This is the part that will show the laravel logo if the app name is laravel, but we can strip that out and add our own image.
The above links to your image. Instead you can embed the image
Embedding your image instead of linking
Instead of linking to an image on your site, you may prefer to embed the image. See the following article regarding the pros and cons of different ways of adding images to your emails;
Instead of linking to the image, you can base64 encode it;
Last updated