What is the Hygraph-Imgix integration and what can it be used for?
The Hygraph-Imgix integration allows you to connect your Hygraph project with Imgix, a service for creating, transforming, and optimizing images and videos. With this integration, you can serve assets from your Hygraph project and from other Imgix sources directly within your Hygraph content entries, enabling faster webpages, creative freedom, and simpler development. Learn more.
What are the benefits of using Imgix with Hygraph?
By integrating Imgix with Hygraph, you benefit from Imgix’s advanced processing and delivery capabilities, which result in faster webpages, creative freedom for content editors, and simpler development workflows. Content editors can add assets from Imgix sources directly within Hygraph, leveraging Imgix’s optimization services for an enhanced digital experience. Source
Getting Started & Prerequisites
What do I need before I can use the Hygraph-Imgix integration?
To use the Hygraph-Imgix integration, you need:
A Hygraph account. Sign up here if you don't have one.
An Imgix account. Sign up here if you don't have one.
Apps are environment-specific, so configuration is applied per environment. Source
Configuration & Setup
How do I configure a source in Imgix for use with Hygraph?
To configure a source in Imgix:
Create a new Imgix source, selecting Web Folder as the storage type. See Imgix's documentation for details.
Enter the base URL for your Imgix source. For Hygraph's legacy asset system, use https://media.graphassets.com/. For the Hygraph Asset Management system, copy the image address from the asset tab and use the part before /output=....
Use the default Imgix subdomain or configure your own, then click Deploy Source.
What are the known limitations of the Hygraph-Imgix integration?
Known limitations include:
If you replace an asset file in Hygraph, the old version may still display. To update, delete the asset and create a new one.
Occasionally, fields may get clipped and the button to add or change assets may not be visible. Refreshing the page usually resolves this. If not, open an issue.
What security and compliance certifications does Hygraph have?
Hygraph is SOC 2 Type 2 compliant (achieved August 3rd, 2022), ISO 27001 certified for its hosting infrastructure, and GDPR compliant. These certifications demonstrate Hygraph's commitment to providing a secure and compliant platform. Learn more.
Support & Resources
Where can I find more information or support for the Hygraph-Imgix integration?
You must have a Imgix account. If you don't have one yet, you can create one here.
Apps are environment specific. This means their configuration is applied per environment. Take this into consideration if you're working with a project using more than one environment.
The first thing we need to do is configure a source in your Imgix account. The configuration flow will vary depending on whether you want to serve assets from your Hygraph project or from one of the other configurable sources.
Create a new Imgix source, selecting Web Folder as a Storage Type. This document contains more details about the Web Folder source.
Enter the base URL for your Imgix source. If your Hygraph project is using the Legacy asset system, you will need to use https://media.graphassets.com/ as the base URL. If your project uses the Hygraph Asset Management system, follow the instructions below to obtain the URL, go to the Assets tab in the Hygraph app and right click any asset thumbnail, then select Copy Image Address at the bottom of the preview. Keep the part before /output=... and delete the rest.
Use the dropdowns to select which project and environment you want to install the app in, then click Install app.
The permissions pop-up will display. Clicking Authorize app finishes the installation and takes you to the app configuration screen.
Next, you need to configure the app. To do that, you first need to select Webfolder as a source type in the Hygraph app configuration - this should be the default value.
Enter your imgix source domain in the Source URL field, prefixed with https://.
Source URL example
If you used my-assets during the creation of your Imgix source, then the Source URL would be https://my-assets.imgix.net.
Click Save config settings to finish the configuration process. A pop-up notification in the bottom right corner of the screen will indicate that the changes have been saved.
Use the dropdowns to select which project and environment you want to install the app in, then click Install app.
The permissions pop-up will display. Clicking Authorize app finishes the installation and takes you to the app configuration screen.
Next, you need to configure the app. To do that, you first need to select Other as a source type in the Hygraph app configuration.
Enter your imgix source domain in the Source URL field, prefixed with https://.
Source URL example
If you used my-assets during the creation of your Imgix source, then the Source URL would be https://my-assets.imgix.net.
Fill in the API Key field with an API key obtained from your Imgix account.
Pro Tip
To create a new imgix API key, use the dropdown menu in the top-right corner of the Imgix dashboard, then go to API Keys and select Generate new key.
The permission that is necessary for the app to access your assets is Asset Manager Browse.
Fill in the Source ID field with the ID if your Imgix source. To find your source ID, go to your Imgix dashboard, navigate to Sources, and select View on the source you want. You will find the source ID under the Source ID field.
Click Save config settings to finish the configuration process. A pop-up notification in the bottom right corner of the screen will indicate that the changes have been saved.
Select the model that you want to add the Imgix field to.
Select the Imgix field from the Add fields right sidebar.
Complete the Display name field, and the API ID will be auto-filled by the system. Optionally, you can also add a Description.
This screen also allows you to control different properties of your Akeneo field: you can allow multiple values, or you can localize the field, by selecting the checkboxes in the Field options section.
Select the view that you configured the Imgix for.
Click + Add entry to create a new entry or, alternatively, edit an existing entry by clicking on the pencil icon.
Locate the Imgix section of the screen and click on Add assets. This opens a new screen where you can select and add assets to your Hygraph content entry.
Select the asset(s) you want, and then click Add selected assets. If your Imgix Field configuration allows multiple values, you will be able to select multiple assets.
After selecting the asset(s) you want and returning to the content entry, your selection will display on the list. You can optionally use the six dots icon to drag and drop the assets on the list to organize them in the order you want, or click on the X on the right of an asset card to remove it form the list.
These are known limitations due to the way Hygraph & Imgix work. Please read these carefully before using this app.
If you replace an asset file in Hygraph, it will not update and show the old version instead. Please delete the asset completely and create a new one if you want to change the displayed image.
Sometimes, fields might get clipped and the button to add or change assets might not be visible. Refreshing the page resolves the issue. This a rare but known bug for Hygraph apps. If the issue still persists after a refresh open an issue.