Skip to content

Commit fa8f5b1

Browse files
committed
[Mailer] Document email.image name parameter
1 parent 50c531c commit fa8f5b1

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)