Images under 20KB
When running Pre-flight checks, you may receive a warning when your project contains image files that are less than 20KB in size. This is historically the minimum file size required when publishing your NFTs to decentralized storage through the Candy Machine cli.
In order to handle this, we've created a script that you can run on your images after export to inflate them, by adding harmless text to the image metadata.
Run the script alongside the directory containing all of your images and metadata. The script expects the name of this directory to be
assetsand that all images will be inside of it, not in subdirectories.
To run the script, be sure to have
nodeand a package manager like
Then install the png-metadata dependency:
npm i png-metadata
Finally, run the script (assuming you saved the gist above as
That's it! If it worked, all of your image files should now be 24KB.