How to use image links from Google Drive in labels

AzureLabel can display images using URLs stored in data fields. When images are stored in Google Drive, the standard sharing links provided by Google Drive cannot be used directly because they point to a web page rather than the image itself.

A typical Google Drive sharing link looks like this:

https://drive.google.com/file/d/{Image ID}/view?usp=sharing

To display the image in a label, the link must be converted to a direct image URL:

https://drive.google.com/thumbnail?id={Image ID}&sz=w{Image width in pixels}

You can perform this conversion automatically in the label template using the Replace function.

For example, if the image URL is stored in the [Image] data field and the desired image width is 1000 pixels, use the following formula:

[Image] Replace("/file/d/", "/thumbnail?id=" , "T") Replace("/view?usp=sharing", "&sz=w1000" , "T")

Enter the formula in the Formula Designer:

When the label is generated or printed, AzureLabel converts the Google Drive sharing link into a direct image URL, which is then used to download and display the image in the label.