8 – Count multivalue image field values in views-view-fields.html.twig


Making a presentation template for the gallery. The photo gallery has an image field with multiple values. I need to output the number of gallery photos (in the field_gallery_photo). How do I do this? I tried adding a field with a photo to the view, and all the values are shown in one line. The result is not accurate:

{{ fields.field_gallery_photo.content | length }}