vrindavani says:
<img class="fancybox" visible='<%#!string.IsNullOrEmpty(Eval("img_path").ToString()) %>' src='<%#string.Concat("Img/",Eval("img_path")) %>' style="width:100%" object-fit:cover; />
Since you are using HTML image tag visible property will not work without runat="server".
Add the runat="server" property.
<img class="fancybox" runat="server" visible='<%#!string.IsNullOrEmpty(Eval("img_path").ToString()) %>' src='<%#string.Concat("Img/",Eval("img_path")) %>' style="width:100%" object-fit:cover; />