diff --git a/packages/components/OptimizedImage.tsx b/packages/components/OptimizedImage.tsx index f228c63fcc..e5885921e2 100644 --- a/packages/components/OptimizedImage.tsx +++ b/packages/components/OptimizedImage.tsx @@ -120,9 +120,11 @@ const transformURI = ( return uri; } - // XXX: pass gateway token from env to get images in localhost if (uri?.startsWith("ipfs://")) { - return `https://teritori.mypinata.cloud/ipfs/${uri.substring("ipfs://".length)}?img-width=${Math.round(width)}&img-height=${Math.round(height)}&img-fit=contain`; + // FIXME: passing the gateway token here is unsafe and people could rip our cap but the host origin method seems broken atm + const gatewayAccessToken = + "0Ik-SBA6O3xxcvHBRmD526aG06EEwIqwcr14MFfFveyotZmOI4v9gLfJgHW3SRFY"; + return `https://teritori.mypinata.cloud/ipfs/${uri.substring("ipfs://".length)}?img-width=${Math.round(width)}&img-height=${Math.round(height)}&img-fit=contain&pinataGatewayToken=${gatewayAccessToken}`; } const params = resolveParams(width, height);