Small fix to get image annotations, optionally return json or array.