I have a question regarding jquery fancybox .
My code in load():
$(".fanciogallery").on("click", function(e){
    e.preventDefault();
    var gid = $(this).data("gid");
    var fancyarray = [];
    //already have an array with the infos
    gallery_array[gid].forEach(function(element){
        var impa = uploadfold + gid + '/immages_' +  element.id_img + '.png';
        //fill an array to pass to fancybox
        fancyarray.push(
            {href : impa, title : 'Title'}                                                           
        );
    });
    $.fancybox.open(
            fancyarray,
            {
                //options
                loop : false
            },
    );
  });
I am doing some testing so it's not complete or refined. I get "The requested content cannot be loaded" but it seems to get the number of elements right.
I get this error even if I hardcode a valid imagepath into
href:
probably I am filling the array wrong, the documentation it's not clear for me. Do you know what I am doing wrong?
Thank you
 
     
    