**NFT Image Transfomer** I wanted a way to resize/cache nft images for speedy loading nfts on the front end so I build this. Mimics the functionality of cloudinary/ImageKit, but uses shadow drive to store the images. This is based on firebase functions, but could be adapted to any serverless platform or nodejs app. Also this is for the solana ecosystem but could be used for any blockchain given you have a way to get the image. *_Current this only supports resizing, but could be expanded to support other transformations._* **Setup** 1. Get a shadow drive account. https://www.shadow.cloud 2. Install these pacakages: ```npm install jimp @shadow-drive/sdk @metaplex-foundation/js``` - Jimp - https://www.npmjs.com/package/jimp - Shadow Drive - https://www.npmjs.com/package/@shadow-drive/sdk - Metaplex - https://www.npmjs.com/package/@metaplex-foundation/js 3. Optional but highly recommended: Signup with helius to get a free solana rpc endpoint. https://helius.network 4. Add local environment variables for your shadow drive key and helius rpc key. - HELIUS_RPC_KEY - SHADOW_KEY **How it works** - Hit the url with the mint address and transformations - The function checks shadowdrive to see if the image exists with the transformations applied - If the image exists, it returns the image from shadowdrive - If the image does not exist, it gets the image with metaplex, applies the transformations, saves it to shadowdrive, and returns the image **Structure & Usage** `https://whateverneatosite.com/transform/sol/{MINT_ADDRESS}/w-{number}_h-{number}?api-key={apikey}` Example Url: `https://us-central1-coinboi-27940.cloudfunctions.net/transform/sol/8UsGRVd8miHUawQm9ECJSBeJ4t2q3UBsiJiF1c7p246Y/w-300_h-300?api-key=alloi-secret-club` In an image tag `<img src="https://us-central1-coinboi-27940.cloudfunctions.net/transform/sol/8UsGRVd8miHUawQm9ECJSBeJ4t2q3UBsiJiF1c7p246Y/w-300_h-300?api-key=alloi-secret-club" />`