You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contao: 4.13.50
NC: 2.2.3 (+NC pro 1.03)
PHP: 8.2.0
Local images in the email_html, like <img src="files/imgs/logo.png">
are always converted into external paths, e.g., <img src="https://domain.tld/files/imgs/logo.png">.
Since there is no longer an option to explicitly select "external images," I would expect all local images to be embedded by default.
The method embedImages is called afterrenderEmailTemplate.
In renderEmailTemplate, the convertRelativeUrls function makes all URLs absolute. This causes the Virtual File System (VFS) to fail later when it tries to embed the images, as the files cannot be located anymore.
Wouldn't it make sense to call embedImagesbeforeconvertRelativeUrls? Or alternatively, exclude local image paths from being converted to absolute URLs?
The text was updated successfully, but these errors were encountered:
Contao: 4.13.50
NC: 2.2.3 (+NC pro 1.03)
PHP: 8.2.0
Local images in the
email_html
, like<img src="files/imgs/logo.png">
are always converted into external paths, e.g.,
<img src="https://domain.tld/files/imgs/logo.png">
.Since there is no longer an option to explicitly select "external images," I would expect all local images to be embedded by default.
However, as I can see in the source code:
contao-notification_center/src/Gateway/MailerGateway.php
Lines 134 to 148 in 6edef05
The method
embedImages
is called afterrenderEmailTemplate
.In
renderEmailTemplate
, theconvertRelativeUrls
function makes all URLs absolute. This causes the Virtual File System (VFS) to fail later when it tries to embed the images, as the files cannot be located anymore.Wouldn't it make sense to call
embedImages
beforeconvertRelativeUrls
? Or alternatively, exclude local image paths from being converted to absolute URLs?The text was updated successfully, but these errors were encountered: