I've been using the BarcodeURL() example from Marketing Cloud's documentation. Their example seems straightforward however it keeps generating a broken image in the Content Builder preview. When sending it to myself for testing it also renders a broken image in the email. I have also tried with several different types of barcodes using the list from the documentation, to no avail.

Here is the example code I'm using in the email:

<img style="width: 400px; height: 200px" title="barcode" border="0" hspace="0" 
alt="barcode" src="%%=BarCodeURL("BBY01-397101069285","Code128B", 400, 200, 0)=%%" width="400" height="200">

This is the broken barcode image in Marketing Cloud Preview:


This is how it renders when the email is test sent to my account:



Your code works fine for me and it displays they barcode Image, can you inspect and see If you're able to access the Image (Src URl should be in the format: http://cl.YourInstance.exct.net/LiveContent.aspx?qs=)

  • When I try the URL you suggested with our instance I can see a grey block that says "Live Content". When I inspect the BarCodeURL in our Marketing Cloud preview, it appears to be generating a malformed URL: https://email-app.OurInstance.marketingcloudapps.com/%%=BarCodeURL('BBY01-397101069285','Code39', 400, 200, 0, 0)=%% Any idea there?
    – Jeremy
    Jun 14 '18 at 21:17
  • Sorry for responding late, did it get resolved? It appears that you're sending the email without selecting a subscriber. Jul 17 '18 at 15:55

Test by viewing the email outside of your corporate network. E.g. pop into Starbucks and test.

I've seen situations where corporate firewalls and proxies block SFMC SAP domains as an InfoSec anti-spoofing security check.

It may well be a case that your code is working fine, just that your images are being blocked internally of your corporate network

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.