# Dynamic images loaded to an image widget from a choice/CSV selection

**URL:** <https://forum.getodk.org/t/dynamic-images-loaded-to-an-image-widget-from-a-choice-csv-selection/41921>\
**Category:** Showcase\
**Tags:** enketo, odk-collect\
**Created:** [June 14, 2023, 11:31am UTC](https://forum.getodk.org/t/dynamic-images-loaded-to-an-image-widget-from-a-choice-csv-selection/41921 "2023-06-14T11:31:58Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ahblake](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ahblake/32/22392_2.png) [@ahblake](https://forum.getodk.org/u/ahblake)\
**Post date:** [July 5, 2023, 5:13am UTC](https://forum.getodk.org/t/dynamic-images-loaded-to-an-image-widget-from-a-choice-csv-selection/41921/5 "2023-07-05T05:13:09Z")

</div>

Another chapter in the increasingly inaccurately named _Dynamic images loaded to an image widget_ thread... (Apologies to Douglas Adams). Perhaps this thread should be renamed 'Dynamic Images in image/select/note widgets' or something...

# Dynamic SVGs for a select-one with `image-map` appearance

It's not currently possible to use an SVG as an image in a question or a note _that will let you zoom/pan it_ like `image-map` will. `big-image` also can't be used easily as the default image viewer usually can't handle SVGs, and the SVG viewers that I have tried aren't great ([see previous post](https://forum.getodk.org/t/select-one-multiple-with-images-for-choices-big-image-choice-filtering-labels-images-not-shown-enketo-images-repeated-collect/40655/2))

## Image column solution (Collect)

However it is possible to create a `select-one` question that has no valid choices and isn't mandatory nor read only ([see another previous post](https://forum.getodk.org/t/displaying-svg-in-collect-not-image-map/36197/4)) and use the `image-map` appearance to render the SVG in a form that can be zoomed and panned for reference.

Extending this, it is possible to dynamically change the displayed SVG using form selections by using a field in the `image` column for the select-one.

Again, this is like a dynamic image for a note (or a dynamic image against a question that puts the variable in the `image` column) in the prior post;

- ✅ A static SVG eg `filename.svg` in the `image` column **works in Collect and Enketo.**
  - Not actually dynamic, this would require a select for every SVG and relevance to display the correct one.

- 🐉✅ A dynamic SVG filename like `${my_selected_SVG}` in the `image` column **works in Collect** but in Enketo returns **SVG image could not be found**.
  - So this is only usable if not creating submissions in Enketo
  - SVG Filenames also must be detailed somewhere else (eg choice list) so that Central will require their upload.

---

_[View the full topic](https://forum.getodk.org/t/dynamic-images-loaded-to-an-image-widget-from-a-choice-csv-selection/41921)._
