You are asking two questions really:
- What can be stored on-chain
- What can be stored economically
Let's address them separately.
What can be stored on-chain?
The ERC-721 Metadata Extension (
ERC721Metadata) and ERC-1155 Metadata Extension (
ERC1155Metadata_URI) both specify that a URI can be attached to an NFT but the specifications are slightly different:
ERC-721 states that this URI:
"may point to a JSON file that conforms to the "ERC721 Metadata JSON Schema".
ERC-1155 states that this URI:
"MUST point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema"
According to these specifications, the ERC-721 allows ANY kind of metadata. This includes URIs that are NOT JSON objects, such as
urn.us.pa.state.identity.drivers-license.213049873409 which could be a URN to represent a specific licensed driver in Pennsylvania, USA.
ERC-721 also allows URI data such as including a JSON (perhaps following the ERC-
721 Metadata JSON Schema) file on-chain or any other file.
Strictly speaking, ERC-1155 only supports JSON objects and it only supports a URI that will "point" to that JSON object file. You might consider this to mean that only URLs are valid as metadata on ERC-1155.
In summary: you can store JSON objects and any arbitrary files/data using the ERC-721 Metadata Extension. You cannot store files on chain using the ERC-1155 Metadata Extension (if following the standard strictly).
What can be stored economically?
Ethereum Mainnet is currently very expensive. As of 2021-02-25, storing a megabyte of data on Ethereum Mainnet might cost around USD 10,000 to USD 100,000. This is the way many people are quoting this figure.
Of course nobody is storing these types of files at this cost.
But, you could easily store megabytes of data on POA, Hyperledger Burrow, Ropsten and other networks. I consider all of these to be "Ethereum" (while not "Ethereum® Mainnet") and the cost will be several (many?) orders of magnitude cheaper. And this might be acceptable for your use case.