Skip to main content
All CollectionsMinting
Invalid Metadata String Too Long
Invalid Metadata String Too Long

How to resolve the error "String at image too long" when uploading metadata

Updated this week

If you encounter the "String at image too long" error when uploading your JSON metadata file to JPG Store, don’t worry—this is a common issue that can be fixed by reformatting the image field in your metadata file.

This guide will explain why the issue occurs and how you can resolve it.


What Causes This Error?

This error occurs when the image field in your metadata file contains a single string that exceeds JPG Store's character limit for metadata processing.

Character Limit

The character limit for a single string in the image field is 64 characters.


Invalid Metadata Example

{
"JPGHippo1": {
"name": "JPG Hippo 1",
"description": "This is an example description for a JPG hippo NFT",
"image": "ipfs://ipfs://QmUNnzQtenM6uEvMFduYp2o4XK4QpC5MuGxe6iFZii8w4ta6YgH35aSbaju8390a",
"mediaType": "image/png",
"Hat": "Wool hat",
"Shirt": "Smart shirt"
}
}

Here, the image field is too long, resulting in the error.


How to Fix the Error

The solution is to split the image field into smaller parts and format it as an array. This format is supported by JPG Store and resolves the issue.

Valid Metadata Example

{
"JPGHippo1": {
"name": "JPG Hippo 1",
"description": "This is an example description for a JPG hippo NFT",
"image": [
"ipfs://QmUNnzQtenM6uEvMFduYp2o4XK4QpC5MuGxe6iFZii8w4ta6YgH35aSbaju8390a",
"9dT8201fV283"
],
"mediaType": "image/png",
"Hat": "Wool hat",
"Shirt": "Smart shirt"
}
}

Key Fixes:

  • The image field is now an array enclosed in square brackets [].

  • The long IPFS link is split into two parts, each enclosed in quotation marks and separated by a comma.


Preventing This Issue in the Future

  • Check Metadata Before Uploading: Verify that all fields, particularly the image field, comply with JPG Store's requirements and character limits.

  • Use JSON Validation Tools: Validate your metadata file with a JSON validator to catch any formatting issues before uploading.

Did this answer your question?