Skip to content

Inline Images not embedded in Mail Preview #48808

@tkempf

Description

@tkempf

Laravel Version

10.15.0

PHP Version

8.1.18

Database Driver & Version

No response

Description

Mailables which have inline images embedded by
{!! $message->embed(public_path($storagepath.'/img/image.jpg')) !!}
do not have the binary Data embedded when the preview is rendered in the browser by the render() method.
The Images are embedded correctly in the mail when it is sent.

Steps To Reproduce

  1. Generate a mailable where an image is embedded in the view-template via $message->embed() method.
    i.e. <img src="{!! $message->embed(public_path($storagepath.'/img/image.jpg')) !!}" />

  2. send mail to check that the image is visible in the mail

  3. preview mail in the browser as explained here https://laravel.com/docs/10.x/mail#previewing-mailables-in-the-browser

  4. Image is not shown in the preview. The Source in the image-tag is src="cid:imageid", but the corresponding data-part is missing in the output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions