Skip to content

[13.x] Embed images once in markdown notifications - #62163

Merged
taylorotwell merged 2 commits into
laravel:13.xfrom
xurshudyan:notification-markdown-embed-once
Oct 24, 2026
Merged

taylorotwell merged 2 commits into
laravel:13.xfrom
xurshudyan:notification-markdown-embed-once

Conversation

@xurshudyan

Copy link
Copy Markdown
Contributor

When a markdown notification uses $message->embed(), the image is attached twice, because the template is rendered for both the HTML and text parts:

<img src="{{ $message->embed(public_path('logo.png')) }}">

Mailables avoid this by passing a TextMessage to the text render (#47140). This does the same for notifications. The existing test read the CID from the text part, which belonged to the duplicate, so it now checks the HTML part like the mailable test does.

@taylorotwell
taylorotwell merged commit dae3927 into laravel:13.x Oct 24, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants