Home Forums Add-ons Gallery Field display first gallery picture on archive page Reply To: display first gallery picture on archive page

  • Hi @davelee

    Yes, this is possible, however you will need to write some custom PHP to hook into the save function and then update the post’s featured thumbnail.

    How many ‘first images’ are you showing? Just the one, or are there multiple posts?
    The bad performance most likely comes from ACF having to return all the image data such as crop sizes.

    You can get the root value of the gallery field by using the $format_value param like so:

    $images = get_field('gallery', false, false);

    This will give you an array of ID’s (much faster)

    But you will then need to modify your code to load the image src / alt manually. You can find examples of this on the image field docs page.

    Good luck