Skip to content

Commit d870d86

Browse files
committed
minor #20899 [Mailer] Document email.image name parameter (aleho)
This PR was merged into the 7.3 branch. Discussion ---------- [Mailer] Document email.image name parameter Closes #20894 Commits ------- fa8f5b1 [Mailer] Document email.image name parameter
2 parents ca52f25 + fa8f5b1 commit d870d86

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mailer.rst

+8
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,14 @@ the email contents:
10931093
<h1>Welcome {{ email.toName }}!</h1>
10941094
{# ... #}
10951095

1096+
By default this will create an attachment using the file path as filename:
1097+
``Content-Disposition: inline; name="cid..."; filename="@images/logo.png"``.
1098+
This behavior can be overridden by passing a name (the third argument):
1099+
1100+
.. code-block:: html+twig
1101+
1102+
<img src="{{ email.image('@images/logo.png', name: 'my-logo.png') }}" alt="My Logo">
1103+
10961104
.. _mailer-inline-css:
10971105

10981106
Inlining CSS Styles

0 commit comments

Comments
 (0)