{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "style": {
    "border-radius": "5px",
    "margin": "5px 0px",
    "padding": "0px",
    "border": "none",
    "display": "=if([$Image.serverRelativeUrl]=='','none','')"
  },
  "attributes": {
    "class": "ms-bgColor-themePrimary"
  },
  "children": [
    {
      "elmType": "a",
      "style": {
        "text-decoration": "none",
        "padding": "12px 0px",
        "width": "100%"
      },
      "attributes": {
        "href": "=@currentWeb+'/_layouts/15/download.aspx?sourceurl='+if([$Image.serverRelativeUrl],[$Image.serverRelativeUrl],@currentWeb+'/Lists/**YOUR-LIST-NAME**/Attachments/'+[$ID]+'/'+[$Image.fileName])",
        "target": "_blank",
        "class": "ms-fontColor-white ms-fontSize-m"
      },
      "children": [
        {
          "elmType": "span",
          "style": {
            "display": "inline-block",
            "padding": "0 4px"
          },
          "attributes": {
            "iconName": "Download"
          }
        },
        {
          "elmType": "span",
          "txtContent": "Download"
        }
      ]
    }
  ]
}
