eduardokum / laravel-mail-auto-embed

MIT License
166 stars 36 forks source link

image embed not working when in @component('mail:header') #5

Closed chilio closed 6 years ago

chilio commented 6 years ago

If I put ![logo]({{asset('assets/img/logo.png')}}) in mail body, all is working fine, but if I put this in a header like:

@slot('header')
@component('mail::header', ['url' => env('APP_URL')])
![logo]({{asset('assets/img/logo.png')}})
@endcomponent
@endslot

image is not actually embedded. Any idea or hint what might cause this problem? BTW I noticed the same behavior when ![logo](...) has some spaces or tabs before it (even in mail body)

chilio commented 6 years ago

And another hint... Somehow it works in mail::footer. So far I have not tested other mail components. But this one seems confusing to me and I believe to other users also.... I would be glad, if you could explain this behavior... BTW Laravel 5.5 and PHP 7.1 here

chilio commented 6 years ago

I've managed to solve this by publishing mail templates and updating them accordingly.