Customizing the NFT
Unlock memberships are NFT. They use the same specification used by NFT marketplaces and others
Unlock memberships are Non-Fungible Tokens. They use the same specification used by other NFT projects, called ERC721. This means that, exactly like other NFT, they are visible in wallets.
By default, Unlock provides a generated image for each lock, which looks like this:
Example of generate logo image
However, with Unlock you can easily customize this image. For this, in the dashboard, just click on your lock's icon:
When hovered, you can click the camera to customize the image
From there, you can upload an image (1MB maximum), or select an external URL. We also recommend using a square of at least 300x300 pixels.
If you select an external URL, we will hot-link to it, which means that you will need to make sure this image will remain available.
To customize each memberships' icon, you must use an external URL. Indeed, the image URL that we pass includes
?id=<token id>. You can then have a different image URL for membership 1, 2, ... etc.
- The NFT with id
1(first membership) has this metadata URI :
- And when inspecting its metadata, the image address is:
When using Unlock, by default, we provide some metadata for each token (including the image URL). The locks smart contracts are using the ERC721's specification method
tokenURI. By default, we point to an Unlock hosted URI for this meta-data, but can be customized by any lock manager, by calling the method
baseTokenURI. By doing this, the lock manager removes the only dependency on Unlock Inc.
By default, we provide the following metadata:
name: "Unlock Key",
description: "A Key to an Unlock lock. Unlock is a protocol for memberships. https://unlock-protocol.com/",
The expiration is the memberships' expiration date and the owner is the current owner of the NFT membership.
A "Key Manager" can make the keys to be non-transferrable by interacting with the contract via a block explorer. Here's a tutorial on how that works.