What is the "Gallery with information" model in Hygraph?
The "Gallery with information" model in Hygraph is a schema setup that allows you to create an image gallery where each image includes a title and description. This is achieved by using a component field that lets you add multiple images, each with its own metadata. Learn more in the official guide.
How do I create an image gallery with titles and descriptions in Hygraph?
To create an image gallery with titles and descriptions in Hygraph, you need to:
1. Create an "Image with info" component containing fields for image, title, and description.
2. Add this component to a "Gallery with info" model.
3. Configure the component field to allow multiple values, enabling you to add several images with their own metadata.
For a step-by-step walkthrough, see the official guide.
Can I reuse images with different titles and descriptions in Hygraph galleries?
Yes, by using components, you can reuse images with different titles and descriptions in each gallery entry. Components act as field configuration templates, allowing you to add new content each time. For more advanced use cases, you can also add metadata directly to your Asset System model. See the asset model guide.
What are the prerequisites for building an image gallery in Hygraph?
To build an image gallery in Hygraph, you need:
- A Hygraph account (sign up here)
- A Hygraph project (create a new one, clone the cookbook project, or use your existing project)
- Awareness of your plan limits (see pricing)
- Optionally, review the Getting Started Tutorial for onboarding help.
Is there a way to clone a ready-made image gallery project in Hygraph?
Yes, Hygraph provides a pre-built project containing the entire Image Galleries Cookbook. You can clone it directly using this link. This allows you to explore and compare different gallery configurations without building from scratch.
Features & Capabilities
What are the key features of Hygraph for building image galleries?
Hygraph offers flexible schema modeling, reusable components, and asset management tools. You can create models with fields for images, titles, and descriptions, and configure components to allow multiple images per gallery. Hygraph also supports advanced metadata management and integration with remote sources. See components documentation.
Can I allow multiple image uploads in a Hygraph gallery?
Yes, when adding the "Image with info" component to your gallery model, you can select the "Allow multiple values" option. This enables you to add multiple images, each with its own title and description, to a single gallery entry. See quickstart guide.
What is the difference between using components and references for image metadata in Hygraph?
Components are field configuration templates without attached content, allowing you to add new metadata each time you use them. References link to existing content entries, so the same metadata is reused. Using components lets you customize metadata for each gallery entry, while references are better for shared assets. Learn more about components.
Technical Requirements & Implementation
How long does it take to implement an image gallery in Hygraph?
Implementation time depends on your familiarity with Hygraph and project complexity. For example, Top Villas launched a new project within 2 months from initial touchpoint. Hygraph provides a free API playground and a structured onboarding process to help teams get started quickly. See Top Villas case study.
What resources are available to help me get started with Hygraph?
Hygraph offers a free API playground, a free forever developer account, extensive documentation (see docs), webinars, live streams, how-to videos, and a structured onboarding process. Enterprise customers receive a dedicated Customer Success Manager for personalized guidance.
Support & Troubleshooting
What support options are available if I encounter issues with my image gallery setup?
Hygraph provides 24/7 support via chat, email, and phone. You can also access real-time troubleshooting through Intercom chat, join the community Slack channel (join here), and consult extensive documentation and training resources. Enterprise customers have access to a dedicated Customer Success Manager.
Security & Compliance
Is Hygraph secure and compliant for managing image galleries?
Yes, Hygraph is SOC 2 Type 2 compliant (since August 3, 2022), ISO 27001 certified, and GDPR compliant. It offers granular permissions, SSO integrations, audit logs, encryption at rest and in transit, and regular backups. For more details, see the security features page and security report.
Performance & Scalability
How does Hygraph ensure high performance for content delivery?
Hygraph uses Smart Edge Cache for enhanced performance and faster content delivery, especially for high-traffic and global audiences. It features high-performance endpoints and provides practical advice for optimizing GraphQL API usage. Read more about endpoint improvements.
Use Cases & Benefits
Who can benefit from using Hygraph for image galleries?
Developers, product managers, and marketing teams in industries such as ecommerce, automotive, technology, food and beverage, and manufacturing can benefit from Hygraph. It is ideal for organizations seeking scalable, modern content management with localization, asset management, and content federation capabilities. Explore more gallery types.
What customer success stories demonstrate Hygraph's value?
Komax achieved a 3X faster time-to-market managing over 20,000 product variations across 40+ markets via a single CMS. Samsung improved customer engagement by 15% with a scalable member platform. Stobag increased online revenue share from 15% to 70% after transitioning to a digital-first approach. See more customer stories.
Additional Resources
Where can I find more documentation and guides for Hygraph image galleries?
This guide shows how to build an image gallery model containing a basic component field that will allow you to add multiple images, each with its own title and description.
REQUIRED: You need to have a Hygraph account. If you don't have one, you can sign up here.
REQUIRED: You need to have a Hygraph project.
OPTION 1:Create a project. This is the way to go if you want to follow the entire tutorial for learning purposes.
OPTION 2:Clone the entire cookbook. This is the way to go if you're curious about how the galleries are made but don't want to follow the step-by-step creation process. This project contains the entire Image galleries Cookbook so you can compare them, or look into what instances they contain.
OPTION 3:Use an existing project of yours. If you have a project already and want to add this image gallery to it, this is the way to go. In this case, you may need to adjust parts of the tutorial to your own project schema.
Take plan limits into consideration when adding a recipe to your own project.
In this guide, you'll work with a number of schema elements. Let's look into them:
Model: Your schema is the content structure of your project. You can define your schema by creating models and adding fields, reusable components, and sidebar widgets to them, as well as integrating remote sources and establishing relationships with other models.
Component: a predefined set of fields that can be reused across models and content entries. You can think of a component as a flexible, reusable template: you define the fields that will be used inside a component once, and then fill them with different content every time you use it in a content entry.
Basic component field: a component is a special field type in your Hygraph schema that defines which components of which type can be used in a model. Component fields can be of basic or modular types. A basic component field can only have one component attached to it. You can limit the number of component instances to one, or allow multiple component instances to be added in the content entry.
Path 1: Use this guide to create an image gallery model where all images have a title and description.
Path 2: Clone the project that we created for you. It contains the entire Image galleries cookbook to compare the different gallery configurations without having to clone multiple projects.
This cookbook contains all the recipes we have so far to create image galleries, so you can compare the different gallery configurations without having to clone multiple projects.
To find this particular recipe in the cookbook project, navigate to the schema and look for the "Gallery with info" model.
We will start by creating our image component. It should allow us to add an image along with a title and a description.
We'll click + Add next to Components and add it using this information:
Field
Input
Display Name
Image with info
API ID
ImageWithInfo
API ID Plural
ImageWithInfos
We'll click Add component to save, and then we'll start adding instances to it.
We'll start with a Single line text field, which will be our image component title. Let's add it by clicking Add on the Single line text field card on the right sidebar.
We'll use the following information:
Tab
Field
Input
Settings
Display Name
Image title
Settings
API ID
imageTitle
Settings
Description
Add your image title here
Settings
Use as title field checkbox
Select this checkbox
We'll click Add to save.
Next, we'll add an Asset picker field that will let us add images, using the following information:
Tab
Field
Input
Settings
Display Name
Image
Settings
API ID
image
Settings
Description
Select your image
We'll click Add to save. In this case we will not allow multiple values, because we want to add a single image per title & description.
Finally, we'll add a Multi line text field, for our image description. We'll select it from the right sidebar, and use this information:
Tab
Field
Input
Settings
Display Name
Image description
Settings
API ID
imageDescription
Settings
Description
Write a description here
We'll click Add to save.
Now that our component is ready, let's move on to model creation.
Pro Tip
Another way to add metadata to your images, is to add the fields directly to your Asset System model. This guide shows you how to do it.
In this tutorial, we choose to add this information as instances to a component because this way the images in your gallery can be reused with a different title & description each time.
You can think of components as field configuration templates, without content attached to them. Unlike with references, when using components, you need to add new content each time.
Both ways of adding metadata can be a good choice; when using this in the future, think about your use case to choose the one that works best for your project!
Now that we have a component that lets us add an image with title and description, let's create a gallery model.
In the Schema builder, we'll click +Add next to Models, and use the following information:
Field
Input
Display Name
Gallery with info
API ID
GalleryWithInfo
API ID Plural
GalleryWithInfos
We'll click Add model to save.
Our model has been created but it's empty. To create our image gallery model, we'll add the gallery title, and the component we created earlier.
Let's start with the title, as a Single line text field. We'll find it on the Add fields right sidebar, and click Add on the field card to add it.
We'll use the following information:
Tab
Field
Input
Settings
Display Name
Gallery title
Settings
API ID
galleryTitle
Settings
Use as title field checkbox
Leave this checkbox selected
We'll click Add to save.
Next, we'll add our "image with info" component. We'll make sure the component allows multiple values, so that it lets us add multiple images with title and description to a content entry.
We'll find the Basic component field on the Add fields right sidebar, click Add to add it, and use the following information:
Tab
Field
Input
Settings
Display Name
Image
Settings
API ID
image
Settings
Description
Add your images
Settings
Field options
Select the Allow multiple values checkbox
Settings
Select component
Use the dropdown to select the "Image with info" component
We'll click Add to save.
This is how you create an image gallery model containing a title and a component that will allow you to add multiple instances of an image with a title and description.
This is one way of creating an image gallery using Hygraph. If you want to try out more gallery configurations, we have other image gallery types for you to look into!