1

I have a packaged Lightning Email Template. I am able to upload an image file to a Lightning Email Template with ease. However, when I then try to move that email template to a new environment (i.e. scratch org) or generate a new package version, I receive the following error:

'Attribute "src" on element is not allowed, or has an invalid value.'

This is clearly a security measure, but I am unsure how I can add an image to a packaged email template without hitting this error. I am seeing a lot of documentation on uploading a Document and referencing that document's url, but the url will be specific to each environment. Is there a way to achieve this with a packaged lightning email template?

Here is the code that is implicitly generated when I upload an image via the UI:

<img alt="myimage-1225567679-612x612 (2)" src="{[devName:myimage1225567679612x612_2]}" style="max-width: 1644.45px; width: 69px; height: 56px;" title="myimage-1225567679-612x612 (2)" width="69" height="56" />
0

Did you ever figure out how to resolve this issue? I am experiencing it now and cannot this page is the only result that comes up when you search for the error!

UPDATE: For anyone who runs into this issue and finds this page, the answer to the problem is that you need to add the images embedded in your Email Template. You do this by adding the "Asset File" components/records to your change set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.