Image through IPFS (live example)

A in-browser live example of a picture retrieved from the IPFS network.

  "images": [
    {
      "hash": "dd26a05caf67a77fd7b51e2a01ebab47ea824fe4a5e05af81b715a6e2cbb3a6f",
      "data": [
        {
          "protocol": "IPFS",
          "id": "QmUwHMFY9GSiKgjqyZpgAv2LhBrh7GV8rtLuagbry9wmMU"
        }
      ]
    }
  ]

https://ipfs.io/ipfs/QmUwHMFY9GSiKgjqyZpgAv2LhBrh7GV8rtLuagbry9wmMU

John Atkinson Grimshaw, Broomielaw, Glasgow (1886) (by leveraging ipfs.pics)

General structure

The images field is an array of "hash objects", a new "hash object" is added for each unique image (resulting in a unique hash). Multiple DSN references to the same image can be stored in data array within the aforementioned "hash object".

A hash object is required to prevent duplicates of the same image from appearing and provides authentication of untrusted content returned by the DSN (if not by default, we're looking at you HTTPS/ONION).

The first element is the thumbnail by default.

{  
  "version":"0.0.1.0",
  "item":{  
      ...,
    "images": [
      {
        "hash": "9b45c..702",
        "data": [
          {
            "protocol": "LOCAL",
            "encoding": "BASE64",
            "data": "BASE64 encoded image data"
          }
        ]
      },
      {
        "hash": "f84f0..702",
        "data": [
          {
            "protocol": "IPFS",
            "id": "QmUwHMFY9GSiKgjqyZpgAv2LhBrh7GV8rtLuagbry9wmMU"
          },
          {
            "protocol": "HTTPS",
            "id": "https://link.to/image1"
          },
          {
            "protocol": "ONION",
            "id": "https://3g2upl4pq6kufc4m.onion/assets/logo_homepage.normal.v107.png"
          }, 
          {
            "protocol": "SMSG"
          }
        ]
      }
    ]
    ...
  }
}