--- tags: Ideas --- # Open-Source, Skynet-based Image CDN Service ## Problem Services like Cloudinary allow developers to deal with full-resolution imagery and access thumbnail, cropped or `.webp` versions in an automated way. Multimedia uploaded to Skynet cannot utilize this functionality automatically, such that all imagery needs to be pre-processed. Many SaaS companys work in this domain - Cloudinary is one of the more prominent. ## Concept An Akash instance running code that can accept Skylinks and write to a Resolver Skylink that is deterministically generated based on the Skylink. The Resolver Skylink points to a directory of resized-images along with a "manifest" JSON file. These could be lazily generated by using a library which requests the thumbnail item from Skynet or the Resizer API. - If the item already doesn't already exist on Skynet, the item is requested from the resizer API, which could respond with the requested thumbnail, while processing the pre-determined resize formats and uploading it to Skynet. Note: for further functionality, maybe "Square" crops or collections with outher advanced options are each stored in separate resolver skylinks. ## Existing Work - Either redsolver or DaWe do something similar with [SkyStandards](https://github.com/SkynetLabs/skystandards) Posts or SkyID profile images, but I can't remember which. - There are of course libraries for image resizing (NodeJS has [Sharp](https://github.com/lovell/sharp)) but open-source services could be adapted for more advanced functionality like detection algorithms. See [thumbor](https://github.com/thumbor/thumbor) ## Benefits over a fully centralized API - Different operators could run nodes as "fall-back" APIs - Even if offline, all their previous resizing work remains available - The original size upload may not be optimized, but can be loaded as a failover. - "Private" instances could be spun up for batch processing for something like a Google Photos on Skynet that only deals with your Encrypted MySky files. ## Questions - How do we minimize the painpoint of initial image creation? - Can a client-side app pre-generate images to let a user then pin the generated Skylinks? - Could multiple servers run this service, but check and see if other servers have created payloads before linking theirs? There's a trust propogating here, and the computation cost might be cheap enough that it doesn't matter. - Can monetization work here? Does it need to?