url package:hvega

Encode a URL for use with the Image mark type. The URL can be encoded directly:
let axVals = Numbers [ 0.5, 1.5, 2.5 ]

dvals = dataFromColumns []
. dataColumn "x" axVals
. dataColumn "y" axVals

enc = encoding
. position X [ PName "x", PmType Quantitative ]
. position Y [ PName "y", PmType Quantitative ]
. url [ HString "wonderful-image.png" ]

imMark = mark Image [ MWidth 50, MHeight 25 ]

in toVegaLite [ dvals [], enc [], imMark ]
or by referencing a data field containing the URL values:
... dataColumn "img" (Strings [ "i1.png", "i2.png", "i4.png" ])

... url [ HName "img", HmType Nominal ]
Declare data source from a url. The url can be a local path on a web server or an external http(s) url. Used to create a data ( property, specification ) pair. An optional list of field formatting instructions can be provided as the second parameter or an empty list to use the default formatting. See the Vega-Lite documentation for details.
dataFromUrl "data/weather.csv" [ Parse [ ( "date", FoDate "%Y-%m-%d %H:%M" ) ] ]