I deployed a contract and minted 5 tokens under the ERC-1155 standard. After reading in multiple that you can replace old URI with a new one to update the metadata of a token, I tried to use my setURI function to set a new IPFS link to display different metadata:

function setURI(uint _id, string memory _uri) public onlyOwner {
    tokenURI[_id] = _uri;
    emit URI(_uri, _id);

After setting the URI, you can read directly from the contract and the new URI is displayed and the link works just fine. I can even mint a new token with the new metadata and it displays perfectly fine. The only problem is when a token has already been minted and I have already set the URI once, so for some reason alchemy is still reading the first setURI rather than the new one I just did.

1 Answer 1


Alchemy API is caching NFT media. Eventually the new tokenURI should show up there, too.

  • Is this a joke?? “Eventually” is not good enough for pretty much any app where the tokenUri changes…
    – Jim
    Jul 22 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.