0

Is it possible to set a collection image when deploying an ERC-721 contract? I can see the constructor expects name and symbol, but when I open the collection on any marketplace, of course the image will me empty. Couldn't find much info about collection image, any help will be appreciated!

1 Answer 1

0

I'm not sure you want to ask about the entire collection's images, or each nft's image. So I will try to answer both.

For entire collection's image, when you listing your token on a marketplace, the marketplace will ask you about the collection image. Here is the creation form in opensea.

But if you want to ask about the images of each nft token, you have to put it in an off-chain metadata (it can be a hosted server or IPFS). When listing the collection on marketplace, the market place will fetch that metadata and display it on their platform. The token's image is usually in the field image in the metadata.

{
  "tokenId":"14461",
  "name":"The Association NFT #14461",
  "description":"...",
  "image":"https://i.rstrstrst.com/img/17622", // <--  
  "attributes":[...]
}

You can read my answer in another thread for an example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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