Adding Media to Trait Templates

When minting traits, each trait can have a media asset such as an image. In this guide, we will provide instructions on preparing image URLs for traits to be minted to collections.

Preparing Image URLs for Traits using Arweave

1. Upload the Image to Arweave

To upload the image to Arweave, follow these steps:

  • Create an account using ArDrive.

  • Create a new public drive.

  • Click the 'Upload' button to upload your files.

  • Choose the files you want to upload.

  • After the upload is complete, copy the Transaction ID (Tx ID) of each uploaded file.

2. Create the Image URL

To create the image URL for each uploaded image, follow these steps:

Example

Let's say you have an image named "blue_hat.png" that you want to use for a trait.

  • You upload this image to Arweave, and the Tx ID of the uploaded file is "KqJzZw47JHrKkEo8WLSyYYX9xQjk".

  • To create the image URL for this image, concatenate the Tx ID with the Arweave gateway URL: https://arweave.net/KqJzZw47JHrKkEo8WLSyYYX9xQjk.

You can now use this Image URL in your trait template as the media asset for the trait.

{
  "value": "Blue Fedora",
  "trait_type": "Hat"
  "render_order": "5"
  "image_url": "ar://PHVlm5NP_cmlKB9SPWymrnYxa4DOUs935yrCvlf1c_c",
  "original_minter_royalty_bips": "200",
  "artist_royalty_bips": "200",
  "artist_address": "0x956fefb316a11fa5b528f1fe0eee2b2e2e62ae60",
  "original_minter_address": "0x7b7ec6cfa269d17f8484fd031748d80929f96491",
},

Last updated