Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

iammursal
Copy link
Contributor

Closes #56808

Problem:

This PR resolves an issue where embedded images in email views with multi-line <img> tags were not correctly replaced with inline data URIs.

Fix:

  • The fix updates the replaceEmbeddedAttachments logic to handle multi-line tags, ensuring images are properly rendered in the final HTML.
  • Added a new test case was added to verify that multi-line embedded images are correctly processed and replaced with data:image/png;base64,... URIs, and that no cid: references remain in the output.

Impact:

  • No breaking changes.
  • Regex is now safer and more robust for multi-line tags.

@iammursal iammursal changed the title Fix: multi-line embedded image replacement in mail views [12.x] Fix multi-line embedded image replacement in mail views Aug 29, 2025
@taylorotwell taylorotwell merged commit 2b79368 into laravel:12.x Aug 29, 2025
20 of 63 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.

Embedded images in emails not replaced in Blade templates when <img> tag spans multiple lines
2 participants