Views: how to add rel attribute to multivalue image thumbnail I know about lightbox module, but I need a universal solution working with more than one jQuery plugin.

There is a view with image field displayed as a thumbnail and I'd like to link it to the normal image, and the link should have "rel" attribute. 

How to implement it in the simplest way?

In the View->Fields->myfield properties, the first option (Link image to File) won't work because there is no option to insert "rel" attribute.

The second option is to REWRITE RESULTS and "Output this field as a link" and insert "lightbox" as a rel text. But what to write in the "Link path" textbox??

The path to image is: /sites/example.com/files/gallery/img1.jpg


How to obtain the "/sites/example.com/files/" path other than just 
hardcode typing it? (it's a public:// stream)
How to obtain the "img1.jpg" image name? I tried [field-image]
replacement token but didn't work and there seem to be no fields that look like the file name.
You can install Image URL Formatter module. This will give you "Image URL" as a formatter option on Views. 

So what to do is:


Add the image field, and Exclude from display. Set the formatter as Image URL
Add the same image field again. This one should be outputted as a thumbnail with Image Styles (perhaps), and have the normal "Image" formatter. Rewrite -> Output this image as a link, put the field added in step 1 to the link path.