Exposing URLs for querying images

Is your backend canister implemented in rust or motoko?

But in both cases it is not hard to return raw HTTP, by exposing the http_query method, at least if you are content with <canisterid>.raw.ic0.app URLs and the fact that this is not safe against malicoius nodes.

There just isn’t much documentation yet, and not even the spec is out yet, but you cargo-cult from various example projects.

Serving it in a way that works from <cansiterid>.ic0.app (i.e. certified) is also possible, but significantly harder.

Or you can just use dfx’s default “certified asset canister” to store the files, then HTTP access works out of the box. Again, I believe we are missing a tutorial for how to use that canister in your poject, e.g. upload files to it.

2 Likes