Hi,
the lightbox webpart displays correctly images from documents. If you would like to use lightbox with attachments, please use
Attachment image gallery webpart with transformation:
<a style="text-decoration: none;" href="<%# GetAttachmentUrl(Eval("AttachmentName"), Eval("NodeAliasPath")) %>" rel="lightbox[attachments]" rev="<%# Eval("AttachmentID") %>" title="<%# Eval("AttachmentName", true) %>">
<img style="border: none;" src="<%# IfCompare(ImageHelper.IsImage((string)Eval("AttachmentExtension")), true, GetAttachmentIconUrl(Eval("AttachmentExtension"), null), GetAttachmentUrl(Eval("AttachmentName"), Eval("NodeAliasPath"))) %>?maxsidesize=150" alt="<%# Eval("AttachmentName", true) %>" />
</a>
The second example does not genarate a lightbox code. GetImage method returns only <img src="" ... /> code.
Best regards,
Ivana Tomanickova