Merge Images

How to merge images, QR codes, and barcodes in a label merge using the image merger add-on, Avery Label Merge?

 This article describes how to merge images that have a public image URL using Avery Label Merge add-on. The images can be from a Google Search, Google Drive, or online services that generate QR codes and barcodes using a public image URL.

Merge images using public image URL

This section describes how to merge a generic image (e.g., merge pictures) using a public image URL, irrespective of the origin of the image. For example, the image can be from a Google Search, Google Drive, or online services that generate QR codes and barcodes using a public image URL.

Step 1: Create column with <img> tag

In Google Sheets, create a new column and name it as required, but include the tag <img>, for example, Profile Photo <img> to merge profile photos online.

Step 2: Paste public image URL under <img> column

Paste the public image URL in the applicable cells of the Profile Photos <img> column. The public image URL can be from a variety of sources, such as a Google Search, Google Drive, an image hosting service, or online services that generate QR codes and barcodes using a public image URL. 

See the specific section below for further instructions to obtain the required image public image URL. Repeat the steps for each image merge

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

Step 3: Design then merge labels with images

In the label template, insert the image *|merge field|* as for any other merge field, for example, here it is *|Profile Photo <img>|*. After the label template is designed, the labels can be merged into a Google Doc or a PDF, before the labels are printed. 

In the example below, a table with two columns was inserted into the label template. The table was hidden by making the borders white (the borders are shown in gray here for illustrative purposes). Depending on the requirements, the label size, which determines the size of the label's image (e.g., profile photo), can be selected as needed. To find out more about advanced formatting using Avery Label Merge add-on in Google Docs, refer to this article.

Label Template

Merged Label

Obtain public image URL

This section describes how to obtain the public image URL from a Google Search, Google Drive, or online services that generate QR codes and barcodes using a public image URL.

Google Search

Search for an image using Google Search, as shown in the example below. 

Right-click on the public image and click on Copy image address to copy the public image URL.

The public image URL is now ready to be pasted into a Google sheet, then later the image can be merged into a label.

Google Drive

NOTE: Using Google Drive to host an image may not work for every label merge as Google Drive uses URL redirection. Instead, it is recommended to use an image hosting service, as described in the section below.

Step 1: Upload image to Google Drive

If the image is already hosted in Google Drive, proceed to Step 2.

If the image is not hosted in Google Drive, upload the image to Google Drive by clicking on New > File upload, then select the image file.

Step 2: Click Get link

Once the image file is uploaded, right-click on the image file in Google Drive and click on Get link.

Step 3: Access image

Click on the General access drop-down menu and select Anyone with the Link, to make sure that the image can be accessed and the image merge is performed using Avery Label Merge add-on.

Step 4: Copy public image URL

Click on Copy link to copy the public image URL from Google Drive.

The public image URL is now ready to be pasted into a Google sheet, then later the image can be merged into a label.

Image hosting service

Using an image hosting service that provides a direct public image URL, such as postimage.org, can be more reliable than using Google Drive to host the images. This is because an image hosting service does not use URL redirection. 

Step 1: Select images to upload

From postimage.org, click on Choose images, then select the image(s) that need(s) to be uploaded.

Step 2: Click Share on image

Click on Share on one of the uploaded image(s).

Step 3: Copy public image URLs

Click on the copy icon next to the Direct link field for the image to copy the public image URL.

The public image URL is now ready to be pasted into a Google sheet, then later the image can be merged into a label.

Repeat steps 2-3 to copy the public image URLs for the other images that were uploaded in step 1.

Tutorial video: Merge images into labels using image hosting service

QR codes

Create your QR code using an online service such as Quickcharts.io or Image Charts.

Copy the QR code image URL.

Below is an example of a QR code created using Image Charts, along with the parameters and the URL of the QR code.

Root URL: https://image-charts.com/chart?

QR code: cht=qr

Image size: chs=128x128

Data to encode: chl=samuel%20reeves

Complete QR code URL: https://image-charts.com/chart?cht=qr&chs=128x128&chl=samuel%20reeves

Create a unique QR code image link for each of data by using the formula shown in the Google sheet in the screenshot below.

Tutorial video: Merge QR codes into labels using Google Charts 

Barcodes

Create a barcode using an online service, such as the Online Barcode Generator.

Copy the public image URL for the barcode to merge into Avery labels.

Below is an example of a barcode created using the Online Barcode Generator, along with the URL of the barcode.

Create a unique barcode for each row of data by using the formula shown in the Google sheet in the screenshot below.

Tutorial video: Merge Barcodes into labels using Online Barcode Generator

Advanced feature: Resize original image

The width and height of the image (in pixels) can be specified within the <img> tag.  

In the example below, the column header Profile Photo <img|200x100> means that the image width is going to be resized to 200 pixels and the image height is going to be resized to 100 pixels for all the images in the column.

NOTE:  When the image size is changed in the column header, each image *|merge field|* needs to be reinserted into the label template, so that each image is resized in each label.

Advanced feature: Combine strings of text for public image URLs

Multiple strings of text can be combined by using the & character in the Google Sheets formula bar as shown in the screenshot below. This is useful for combining the URLs of QR codes and the URLs of barcodes, for example, if both a QR code and a barcode need to be inserted into a label.