WIP: reworking the image upload

Signed-off-by: Alan Gardner <alan@armoin.com>