Merge Images

How do I dynamically merge images, QR codes and barcodes?

APPLICATION

This article describes the process for merging images that have a public URL. Hence, this process can be used to merge QR codes and barcodes by using an online service such as Google Charts QR Codes, Image Charts or Barcodes Inc.

Step 1

If your image is already publicly available through a URL, proceed to Step 4. Otherwise, follow these steps to make your image publicly available on Google Drive.

If your image is not already hosted on Google Drive, upload it by clicking New > File Upload.

Step 2

Right click the image file in Google Drive and click Get Link.

Step 3

Click on the access settings drop-down and select Anyone with the Link, and then click Copy Link to copy the link in the dialog box.

Step 4

In Google Sheets, create a new column and name it whatever you want, but include the tag <img>, e.g. QR Code <img>

Step 5

Paste the copied image file link in the desired cells of the column with the <img> tag.

Repeat the steps above for each image that you want to merge.

Step 6

In your merge template, insert the image *|merge field|* as you would for any other merge field, e.g. *|QR Code <img>|*

Merge Template

Merged Content

Advanced Feature: Resize the Original Image

You can specify the width and height of the image in pixels within the <img> tag.

In the example below, the column header Photo <img|200x100> would resize the image width to 200 pixels and height to 100 pixels for all images within that column.

NOTE: Any change of image size within your column header needs to be replicated in the corresponding *|merge field|* of your merge template (and vice-versa).

Advanced Feature: Combine Strings of Text for the Image URL

APPLICATION

You want to easily create unique URLs based on data you already have in your sheet. This is especially useful for QR code and barcode image URLs.

You can combine multiple strings of text by using the & character in the formula bar within Google Sheets (see screenshot below).

The following sample can be produced, as shown in the screenshots below.

Merge Template

Merge Content

NOTE: The URL cannot be more than 235 characters in length.