8000 minor #16633 [Mime] Allow to embed images as CSS backgrounds (javiere… · symfony/symfony-docs@25a9f9a · GitHub
[go: up one dir, main page]

Skip to content

Commit 25a9f9a

Browse files
committed
minor #16633 [Mime] Allow to embed images as CSS backgrounds (javiereguiluz)
This PR was squashed before being merged into the 6.1 branch. Discussion ---------- [Mime] Allow to embed images as CSS backgrounds Fixes #16492. Commits ------- 3f15183 [Mime] Allow to embed images as CSS backgrounds
2 parents bfe810e + 3f15183 commit 25a9f9a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mailer.rst

Lines changed: 8 additions & 0 deletions
< 8000 /tr>
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,18 @@ images inside the HTML contents::
467467
// ...
468468
->embed(fopen('/path/to/images/logo.png', 'r'), 'logo')
469469
->embedFromPath('/path/to/images/signature.gif', 'footer-signature')
470+
470471
// reference images using the syntax 'cid:' + "image embed name"
471472
->html('<img src="cid:logo"> ... <img src="cid:footer-signature"> ...')
473+
474+
// use the same syntax for images included as CSS background images
475+
->html('... <div style="background-image: url(cid:footer-signature)"> ... </div> ...')
472476
;
473477

478+
.. versionadded:: 6.1
479+
480+
The support of embedded images as CSS backgrounds was introduced in Symfony 6.1.
481+
474482
.. _mailer-configure-email-globally:
475483

476484
Configuring Emails Globally

0 commit comments

Comments
 (0)
0