IPFS version of Imagor

I’ve been enjoying @adin 's presentation on IPFS+Wasm and wanted to implement something like Imagor in IPFS. If you have some large image and you want a thumbnail you already have all the information that you’d need to get what you want. You shouldn’t have to go to the network to get it and you shouldn’t not be able to get it just because someone didn’t put the thumbnail onto IPFS.

Maybe you’ve already generated the thumbnail? You shouldn’t have to generate it again. It would be really cool if you could somehow say, “I’m looking for this CID that’s a thumbnail of a larger image. You can either try to directly retrieve the cid or here’s the cid of the larger image, the cid of a wasm file for generating the thumbnail and the cid of the wasm parameters to get that thumbnail . If you run that the output of that will get you the cid you’re looking for”

It seems like that should be possible with some combination of ADL’s and selectors. I remember @Aiden mentioning some of the issues passing parameters to wasm files. (I’ve had the same issue with a wasm plugin system that I wrote) What if you simply make the all your wasm take a single parameter of a CAR file? If you reference your wasm as the wasm CID and the output of your wasm a CAR file with a CID you could address wasm functions simply as mappings from CID => CID via a wasm CID. cid_wasm(input: cid_wasm) → cid_wasm

EDIT: I should have watched all the WASM IPFS videos. I just noticed some of what I mentioned about addressing wasm by cid was addressed. I actually did some of what was mentioned with a database UDF plugin system that used IPFS. I used IPNS names where the client would append its ABI version to the end to retrieve the wasm.