Spotlight plugin - Captions?

Does anyone know how to attach captions/labels to the images? There are some examples in the demo but seems no instructions where to place them and their format?

Thanks.

I don’t have much experience with lightbox, but I think this should work:

\define spotlight-actions()
<$action-spotlight
	$images="""
      https://media.istockphoto.com/id/485375172/photo/mountain-trout-stream-in-pennsylvania.jpg?s=2048x2048&w=is&k=20&c=pp4F95qllg2d4BQqL4ZfDXUZmG98TLPtXxIEm5HL1a0=
      https://media.istockphoto.com/id/1021703630/photo/stream-flowing-through-forest-in-tennessee.jpg?s=2048x2048&w=is&k=20&c=RZUQ-Sx3wfpaAbmiZWa-7nxJNRvUVx-UM1nXH_6VTzg= 
      https://media.istockphoto.com/id/619963520/photo/stream-in-the-forest.jpg?s=2048x2048&w=is&k=20&c=B5qGA0mvoEk6ph3DjX8mNlE5q5fXsN133yFr85cZD-Q=
      https://media.istockphoto.com/id/1303780600/photo/mothar-mountain-rock-pools.jpg?s=2048x2048&w=is&k=20&c=lVzU6TUqU84eOEN11XXSgSRpopBJEn47HGCu4ERvzGA=
    """
    $labels="""
      [[Mountain Trout Stream]]
      [[Stream Flowing Through Forest in Tennessee]]
      [[Stream in the Forest]]
      [[Mohar Mountain Rock Pools]]
    """
	$start="[[Blurry Lawn.jpg]]"
/>
\end

<$button actions=<<spotlight-actions>> > open lightbox </$button>

Note that labels containing spaces will need to be wrapped in [[double square brackets]].

Thanks, yes this does work. The images are of course embedded in the pocedure, which means that the captions/labels can sit here too.

In my case I’m applying Spotlight to an image that is already in the tiddler, so the issue is where to put its caption?

What would be neat would be if the caption could be in a field of the image tiddler. Then the logic would need to be: “For the currently displayed image Find the field value for the field named ‘label’.”

As I said, I don’t have much experience, and don’t have time to investigate at the moment. If I find time this evening and you haven’t solved it, I’ll see what I can do.

Good luck!