XLSForm / pyxform

A Python package to create XForms for ODK Collect.
BSD 2-Clause "Simplified" License
80 stars 136 forks source link

Add size and bandwidth warning to image questions #475

Closed yanokwa closed 3 years ago

yanokwa commented 3 years ago

The default image sizes these days are huge and we are unnecessarily straining bandwidth and storage (both on local devices and on servers).

I propose we warn users who have the image data type that they can resize images by using max-pixels (as described at https://getodk.github.io/xforms-spec/#bind-attributes and https://docs.getodk.org/form-question-types/#scaling-down-images).

There are many places to help users reduce file size (e.g., set a default max-pixel unless form designer overrides, add some UI all the form design tools to suggest max-pixel, resize by default in Collect/Enketo) but none of those places solve the problem elegantly and across the whole ecosystem.

One concern I have is that this is more a suggestion, than a warning, but it's also kind of a warning, so 🤷🏾‍♂️. Something like this would work for me.

Consider specifying a max-pixel value to scale down the image and reduce storage and bandwidth requirements. Learn more at https://xlsform.org/en/#image