laravel 5.4 embed image in mail

前端 未结 6 1017
无人及你
无人及你 2020-12-17 10:21

I have just upgraded my 5.2 install of laravel to 5.3 and then to 5.4 following the official upgrading methods.

I am now tryin

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-17 10:51

    I just encountered the same issue and found a solution.

    Before rendering images you have to create a symbolic link from "public/storage" to "storage/app/public" using this command:

    php artisan storage:link
    

    In "storage/app/public" you should have a folder "images" Now you can render this code in your markdown.blade.php:

    !['alt_tag']({{Storage::url('/images/your_image.png')}})
    

    Second option is similar:

    !['alt_text']({{Storage::url($comment->user->image->path)}}) 
    

    Both work fine

提交回复
热议问题