send image metadata with uri

instead of having the state in the s3 file properties (atm completly
insecure and without proper error handling)