It seems that buried deep inside of EXM, they manually generate this link. I do think the proper solution is probably seeing if the EXM Team can make this image element a little more easily accessible or add in the alt attribute. That being said, I did find a workaround. It might even be a hack!
There is one Pipeline that can be affected, where we can add in this alt attribute to this image tag before sending.
The pipeline to reference is /sitecore/pipelines/SendEmail.
In this pipeline, the processor "FillEmail" is what actually takes the Message Body and converts it into a email packet. Putting a Processor, say called AddAltAttribute before FillEmail provides us a space to do some magic.
Below is the processor that I came up with to add the alt attribute to the
public class AddAltAttribute
public void Process(SendMessageArgs args)
if (args.EcmMessage == null)
var htmlDoc = new HtmlDocument();
var docNode =
var foundElement = docNode.FirstOrDefault(node => node.HasAttributes && node.Attributes["src"].Value.Contains("RegisterEmailOpened"));
if (foundElement == null)
string result = null;
using (var writer = new StringWriter())
result = writer.ToString();
//Set Back in Args
args.EcmMessage.Body = result;
<processor type="SitecoreHacker.Sandbox.EmailCampaign.Pipelines.SendEmail.AddAltAttribute, SitecoreHacker.Sandbox"
patch:before="*[@type='Sitecore.EmailCampaign.Cm.Pipelines.SendEmail.FillEmail, Sitecore.EmailCampaign.Cm']" />
- Putting too much, heavy logic in the
SendEmail pipeline can have a negative effect on the speed of dispatches. Ensure that whatever logic you use, it is completely optimized.
- The above code is provided as an example. No performance tests were utilized.