Change image of Metaplex NFT

Hi, guys!
I am going to change content_uri of Metaplex NFT, it means change name, symbol, image of NFT.
I have some problem in updating Metadata of NFT.
I used @metaplex/js and this is my code.

import { programs } from '@metaplex/js';

export const updateMetadataV1 = async () => {
  let { metadata : {Metadata, UpdateMetadata, MetadataDataData, Creator} } = programs;
  let signer = loadWalletKey(keyfile);
  let nftMintAccount = new PublicKey("EC8gGdtVFDoTf3vEGbLvPp7SVWta2xQrs99iWMbaFrdE");
  let metadataAccount = await Metadata.getPDA(nftMintAccount);
  const metadat = await Metadata.load(solConnection, metadataAccount);
  let newUri = "https://arweave.net/my arweave address";
  if (metadat.data.data.creators != null) {
    const creators = metadat.data.data.creators.map(
      (el) =>
          new Creator({
              ...el,
          }),
    );
    let newMetadataData = new MetadataDataData({
      name: metadat.data.data.name,
      symbol: metadat.data.data.symbol,
      uri: newUri,
      creators: [...creators],
      sellerFeeBasisPoints: metadat.data.data.sellerFeeBasisPoints,
    })
    const updateTx = new UpdateMetadata(
      { feePayer: signer.publicKey },
      {
        metadata: metadataAccount,
        updateAuthority: signer.publicKey,
        metadataData: newMetadataData,
        newUpdateAuthority: signer.publicKey,
        primarySaleHappened: metadat.data.primarySaleHappened,
      },
    );
    let result = await sendAndConfirmTransaction(solConnection, updateTx, [signer]);
    console.log("result =", result);
  }
}

The transaction result has no error, it means transaction success.
I checked it on Solana Explorer and Solscan.io
But the metadata doesn’t change. What’s the matter?

I found a suitable solution from Metadata update fail if update authority is not in the creators array · Issue #734 · metaplex-foundation/metaplex · GitHub

1 Like

Hey, so I’m building a Solana NFT marketplace. I need an experienced rust developer (not a team) you will be creating smart contracts, adding functionality to the frontend which is built in react js

The frontend is not fully complete yet and I have a frontend team still constantly working on it so you will collaborate with the frontend team to help create this backend, I strongly recommend using metaplex, we currently do not have a backend built or started yet.