Community Health Toolkit

Image not shown in care guide form

Dear all,
I am currently migrating our whole CDSS to CHT. In our forms we have some images that displayed well in ODK/enketo.
For CHT I have created a form_name-media folder as described in the docs and uploaded a png file for testing (width of 600pixels)

I also have checked this post, but I already had the same settings.

The image does not show up, just the text. The browser (Brave) also gives that error:

Apparently it has not found the image. I thought if I run cht ... convert-app-forms upload-app-forms
The media files get uploaded to the DB. Or do I need to do this manually?

Any hints are appreciated.

I think our doc is a bit lacking the form structure locally needs to be the path shown below. I’ll put in an issue to update our docs about this. Can you try the path structure below and see if the form updates. Also here is a little more context on multimedia in forms in our docs. You could manually add the attachments through couchdb as well.

<form_name>-media/images/image.png

2 Likes

Thank you Nick,
That worked!
Yes, if that was in the doc, I would have done it right. But I find that your docs are really good in general.

Thank you for the link also. But it suggests modifying the xml file. I want to avoid that because if I modify the xlsx file later on, any prior modifications to the xml would be overwritten.

1 Like

I should have specified the exact link about uploading the attachments. You shouldn’t have to modify the xml if it is already configured correctly. You would just need to upload the image or other multimedia to the document in couch.

Glad that worked for you.