Grab first Image from the gallery-Modul, LIMIT 1

Hi, i try to grab the first image from a gallery-modul with getResource.

Into the documentation i found this, but i think its only for the image-modul, not for the gallery-modul

How does its work with the gallery modul? Have you some tips for me?

Greetings Chris

Hi @visions! You can use the cbGetFieldContent snippet to get the full gallery, and then use &returnAsJSON and a custom snippet to only get the first image. Please see the last example here:

Thanks, it works. :slight_smile: