Bigarray in ocplib-json

is there a way to send bigarrays through JSON with the ocplib-json lib ?
I’m trying to create an object with a bigarray, a width and a height but I can’t use the array constructor for array. I don’t find something to build bigarray encoding fields.

Actually it looks like this:

type image_struct =
Image of int * int * (int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
let enc =
  let open Json_encoding in
  union [
        (req "data" (array int)) (* This type blocks me... *)
        (req "width" int)
        (req "height" int))
        | Image (data, w, h) -> Some (data, w, h)
        | _ -> None)
        | (data, w, h) -> Image (data, w, h)) ]