How to Embed Images from Google Form Responses in Documents

How to use Document Studio to embed uploaded images in generated documents from Google Forms responses.

The Document Studio add-on lets you create pixel-perfect documents from your data in Google Sheets and Google Forms. For instance, someone can fill out your Google Form, upload a photo and the add-on will automatically generate a PDF document with the uploaded photo and form answers (tutorial).

Embed Images in Documents

One of the most unique features of Document Studio is that it can embed images in the generated documents. For instance, you could have a Google Form where the respondent uploads an image and these can be embedded inline in the generated PDF document.

Embed Image in Google Document

All you have to do is add the following marker in your Google Document template and the add-on will replace it with the uploaded image.

{{ Embed IMAGE, File Upload Question }}

You can also resize the image uploaded in Google Forms by specifying the width and height values.

{{ Embed IMAGE, File Upload Question, width=300 }}

Embed Multiple Images in Documents

The above example works great if you have a single image upload question in your Google Form. What if the file upload question in your Google Form allows multiple images to be uploaded and you wish to embed all the images in the generated document?

Document Studio can only embed a single image in a single marker, but there’s a workaround to embed multiple images uploaded in Google Forms in the generated document.

Here we have a question in Google Forms that allows the user to upload multiple images. The question is named Photos and it allows the user to upload up to 5 images in their Google Drive.

Multiple image upload question

When a respondent uploads multiple files and submits the form, a new row is added in Google Sheets and the file URLs are stored in the column as comma-separated values.

Go to the Google Sheet that is storing the form responses and add 5 new columns next to the column that is storing the file URLs. Give each column a name like Photo 1, Photo 2 and so on.


Next, put the above SPLIT formula with ARRAYFORMULA in the first photo column to split the comma-separated values in the file URL column into multiple columns.

Embed Multiple Images in Google Document

The next step is to add the {{ Embed IMAGE }} marker in your Google Document template but this time, instead of using the file upload question, we’ll use the new columns that we have created in the Google Sheet.

{{ Embed IMAGE, Photo 1 }}
{{ Embed IMAGE, Photo 2 }}
{{ Embed IMAGE, Photo 3 }}
{{ Embed IMAGE, Photo 4 }}
{{ Embed IMAGE, Photo 5 }}

Related Tutorials:

  1. Generate personalized images from Google Forms
  2. Create business cards from Google Sheets
  3. Using Formulas with Google Forms Sheets

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory


Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.