I’m currently trying to create an image gallery (with categories), however, I’m wondering what the best way to go about this is.
Attempt 1: Two Collection-Types (Gallery Categories & Gallery Images). This works in principle, but the images have to be uploaded/added individually (one by one).
Attempt 2: One Single-Type (Galleries) with one field “Images”. This also works in principle and you can upload/add multiple images at once. Problem: With the GraphQL query I use, I never retrieve more than 10 images per gallery:
query Galleries {
galleries {
data {
id
attributes {
title
slug
description
displayMode
previewImage {
data {
attributes {
name
alternativeText
width
height
url
formats
}
}
}
images {
data {
attributes {
image {
data {
attributes {
name
alternativeText
width
height
url
formats
}
}
}
}
}
}
}
}
}
}
What is the best way to solve this?
On the overview page, I need to know, how many images have been added to the galleries, and on the gallery page, I need all images for a given gallery, and not limited to 10 items.