# Adding small photo with each answer

**URL:** <https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533>\
**Category:** Support\
**Tags:** form-design, odk-collect\
**Created:** [August 29, 2017, 9:08pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533 "2017-08-29T21:08:00Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![AbrarAlasmari](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/abraralasmari/32/2057_2.png) [@AbrarAlasmari](https://forum.getodk.org/u/AbrarAlasmari)\
**Post date:** [August 29, 2017, 9:08pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/1 "2017-08-29T21:08:00Z")

</div>

**What is the problem? Please be detailed.**

I want to add a small phot to each answer like the question attached here  
**What ODK tool and version are you using? And on what device and operating system version?**

Tablet  
**What steps can we take to reproduce the problem?**  
Show me how to add the photo and show an example for that please

**What you have you tried to fix the problem?**

I tried the media option but didn't work

 ![IMG_4337](https://getodk.b-cdn.net/uploads/default/original/2X/3/36b9c9b03ada303ed6b9a3e4f41d36bdefb8b8fd.JPG)  
**Anything else we should know or have? If you have a test form or screenshots or logs, attach here.**

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [August 30, 2017, 1:15am UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/2 "2017-08-30T01:15:03Z")

</div>

If you are using XLSForm, you can add a `media::image` column and put the name of the media file (e.g., `facemask.jpg`). This works for question text and for choices. For the choice, you'll need to add the `media::image` column to the choices sheet.

Then you have to upload the media files into ODK Aggregate for download or put the media files that you want to include in the /odk/forms/formname-media folder on your phone.

I found this information at [http://xlsform.org/#media](http://xlsform.org/#media) and there is a sample form there that you can try.

---

<div class="post-metadata">

**Author:** ![AbrarAlasmari](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/abraralasmari/32/2057_2.png) [@AbrarAlasmari](https://forum.getodk.org/u/AbrarAlasmari)\
**Post date:** [August 30, 2017, 3:01am UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/3 "2017-08-30T03:01:32Z")

</div>

Thanks a lot for your reply, I tried it but it doesn't work well..  
I have attached a picture for what I get in the tablet

 ![IMG_4348](https://getodk.b-cdn.net/uploads/default/original/2X/e/e09b4fc0964a45fac821f8eb5ea0b3a930e812a7.JPG)

Is there any way to solve this

Thanks  
Abrar

---

<div class="post-metadata">

**Author:** ![AbrarAlasmari](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/abraralasmari/32/2057_2.png) [@AbrarAlasmari](https://forum.getodk.org/u/AbrarAlasmari)\
**Post date:** [August 30, 2017, 3:02am UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/4 "2017-08-30T03:02:08Z")

</div>

![IMG_4349](https://getodk.b-cdn.net/uploads/default/original/2X/d/d808d559951b84c8921aef448a90b0ad306c71a1.JPG)

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [August 30, 2017, 3:24am UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/5 "2017-08-30T03:24:04Z")

</div>

It's going to be hard to help without seeing your form. Build a small one question form with just the question 29 and upload it.

Also, please describe how you are getting the media from your computer to the device.

---

<div class="post-metadata">

**Author:** ![AbrarAlasmari](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/abraralasmari/32/2057_2.png) [@AbrarAlasmari](https://forum.getodk.org/u/AbrarAlasmari)\
**Post date:** [August 30, 2017, 3:24pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/6 "2017-08-30T15:24:45Z")

</div>

[example.xlsx](https://getodk.b-cdn.net/uploads/default/original/2X/4/4a73080063f05e08e14e9b6b9a9e82684d450562.xlsx) (9.0 KB)

Thanks a lot, I have attached the excel form ..  
Regarding the media, I just login my odk account and upload it from the computer ..  
also have a probelm in that because in the odk account it only allow me to uplode one photo and i have two for this question

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [August 30, 2017, 11:01pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/7 "2017-08-30T23:01:55Z")

</div>

The form you attached is not a valid XLSForm. Did you confirm that the form worked before uploading it? If so, how did you confirm?

Can you also please include the Surgical.jpg and N95.jpg you are hoping to use?

---

<div class="post-metadata">

**Author:** ![AbrarAlasmari](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/abraralasmari/32/2057_2.png) [@AbrarAlasmari](https://forum.getodk.org/u/AbrarAlasmari)\
**Post date:** [August 30, 2017, 11:53pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/8 "2017-08-30T23:53:53Z")

</div>

Yes this is excel, I converted that using to XLSForm by the softwrae for that and no probelm.

The pictures I need are attached ![N95](https://getodk.b-cdn.net/uploads/default/original/2X/f/f16a1b5738c658059e8d97431dd7e5b8b87be939.jpg)

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [August 31, 2017, 12:11am UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/9 "2017-08-31T00:11:03Z")

</div>

The form you attached is not a valid XLSForm ([download here](https://getodk.b-cdn.net/uploads/default/original/2X/4/4a73080063f05e08e14e9b6b9a9e82684d450562.xlsx)) is not a valid XLSForm.

If I try to convert it to XML, it says "The survey sheet is either empty or missing important column headers." You can confirm by trying [http://opendatakit.org/xiframe](http://opendatakit.org/xiframe).

What software did you use to convert it?

---

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [September 1, 2017, 7:59pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/10 "2017-09-01T19:59:59Z")

</div>

When testing this I had issues with media displaying correctly when there are language options in the survey if the media column(s) are not also localized. If you remove the `::English` you should be fine. Or you can add a media column for each language. See below. This [XLSForm documentation](http://xlsform.org/ref-table/) says "`::[language]` is optional" for `media::image::language` but it seems like that may not be be always the case, depending on other aspects of your form.

**`survey` tab**

```plaintext
+----------------------+-----------+------------------------------+
| type | name | label::english |
+----------------------+-----------+------------------------------+
| select_one mask-type | mask-used | Which mask type did you use? |
+----------------------+-----------+------------------------------+

```

**`choices` tab**

```plaintext
+-----------+----------+----------------------------+-----------------------+
| list name | name | label::english | media::image::english |
+-----------+----------+----------------------------+-----------------------+
| mask-type | surgical | Normal surgical facemask | Surgical.jpg |
| mask-type | n95 | N95 respirators mask | N95.jpg |
+-----------+----------+----------------------------+-----------------------+

```

**`settings` tab (optional)**

```plaintext
+------------------+
| default_language |
+------------------+
| english |
+------------------+

```

[masks.xlsx](https://getodk.b-cdn.net/uploads/default/original/2X/0/04bb3c182612256f72653f54e30f165dbde69bb9.xlsx) (9.7 KB)

 ![Screenshot_20170829-095617](https://getodk.b-cdn.net/uploads/default/original/2X/e/e3a9148eec02edd8b5913472df3533ff2527de05.png)

---

<div class="post-metadata">

**Author:** ![willohlen](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/willohlen/32/2009_2.png) [@willohlen](https://forum.getodk.org/u/willohlen)\
**Post date:** [September 1, 2017, 7:59pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/11 "2017-09-01T19:59:59Z")

</div>

Hey guys,

I am having a similar issue. I am able to loud images for both of my languages, however I am not able to show the associated label with each image. my appearance is set at compact-1 for the select-one question.

is the size of the image an issue?

Best,  
Will O

---

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [September 1, 2017, 7:59pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/12 "2017-09-01T19:59:59Z")

</div>

Can you post the survey question (the line(s) from your survey and choices sheets) and images you are trying to use here? Feel free to change the words (leaving the strings the same number of characters) and just post the image pixel dimensions if the content is confidential.

---

<div class="post-metadata">

**Author:** ![AbrarAlasmari](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/abraralasmari/32/2057_2.png) [@AbrarAlasmari](https://forum.getodk.org/u/AbrarAlasmari)\
**Post date:** [September 1, 2017, 7:59pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/13 "2017-09-01T19:59:59Z")

</div>

That was very very helpful , many thanks for helping me in that

Abrar

---

<div class="post-metadata">

**Author:** ![AbrarAlasmari](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/abraralasmari/32/2057_2.png) [@AbrarAlasmari](https://forum.getodk.org/u/AbrarAlasmari)\
**Post date:** [September 1, 2017, 7:59pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/15 "2017-09-01T19:59:59Z")

</div>

Thanks a lot for your help , I have solved this

Abrar

---

<div class="post-metadata">

**Author:** ![LN](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ln/32/1605_2.png) [@LN](https://forum.getodk.org/u/LN)\
**Post date:** [September 1, 2017, 7:59pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/16 "2017-09-01T19:59:59Z")

</div>

5 posts were merged into an existing topic: [XLSForm Image Formatting](https://forum.getodk.org/t/xlsform-image-formatting/9519)

---

<div class="post-metadata">

**Author:** ![Aizik](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/aizik/32/12766_2.png) [@Aizik](https://forum.getodk.org/u/Aizik)\
**Post date:** [June 16, 2019, 3:18am UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/17 "2019-06-16T03:18:08Z")

</div>

Exactly my suggestion. The media::image column has to be on the choices list and not in the survey. The inconsistencies in the media column in the survey sheet contributed to it not working.

---

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [December 2, 2021, 9:43pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/20 "2021-12-02T21:43:07Z")

</div>

A post was merged into an existing topic: [Using Logo in XLS form](https://forum.getodk.org/t/using-logo-in-xls-form/11283/10)

---

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [July 21, 2024, 12:03pm UTC](https://forum.getodk.org/t/adding-small-photo-with-each-answer/9533/21 "2024-07-21T12:03:31Z")

</div>

A post was merged into an existing topic: [Insert videos and/or images in multiple choice options](https://forum.getodk.org/t/insert-videos-and-or-images-in-multiple-choice-options/48237/4)
