Skip to content

Step 5: Add your logo

Labels usually carry a brand mark. Images live in their own tab and are referenced by name.

Open the IMAGES tab and upload a logo, then return to LAYOUT BUILDER.

  1. Add an Image element.
  2. Set X Start to 25%, X End to 75%.
  3. Set Y Start to 2%, Y End to 16%.
  4. Set Value template to {{ images['logo.png'] }}, or use Insert Image.

The key is the image's filename, exactly as you uploaded it, so a file named my-brand.png is read as {{ images['my-brand.png'] }}. The square brackets are what make a filename usable as a key, since the dot in .png would otherwise be read as reaching into a nested value. Insert Image writes the whole thing for you.

Referencing by name means one upload can be used by several elements. The image keeps its aspect ratio inside the box you gave it.

Use an image with a solid background rather than a transparent one. Transparent areas print as black, which is the single most common surprise with label images. See the logo prints as a black box.

Labels with a logo at the top

Printed PDF • Layout JSON

Behind the scenes
{
  "name": "Tutorial label",
  "labelContentLayoutElements": [
    {
      "name": "Tag barcode",
      "elementType": "CODE128_BARCODE",
      "xStartFraction": 0.05,
      "xEndFraction": 0.95,
      "yStartFraction": 0.46,
      "yEndFraction": 0.66,
      "valueTemplate": "{{ package.label }}"
    },
    {
      "name": "Tag number",
      "elementType": "TEXT",
      "xStartFraction": 0.05,
      "xEndFraction": 0.95,
      "yStartFraction": 0.38,
      "yEndFraction": 0.45,
      "valueTemplate": "{{ package.label | boldEndingDigits }}",
      "paragraphFontName": "Helvetica",
      "paragraphFontSize": 7,
      "paragraphSpacing": 8,
      "horizontalParagraphAlignment": "CENTER",
      "paragraphTextResizeStrategy": "SHRINK_TEXT"
    },
    {
      "name": "Logo",
      "elementType": "IMAGE",
      "xStartFraction": 0.25,
      "xEndFraction": 0.75,
      "yStartFraction": 0.84,
      "yEndFraction": 0.98,
      "valueTemplate": "{{ images['logo.png'] }}"
    }
  ]
}

Next Steps