The new Hygraph Asset Management system has been developed with a clear focus on improving performance and availability.
In the first phase of rollout, the user interface remains unchanged. However, that doesn’t mean you won’t notice any difference - the changes we’ve implemented in the backend architecture have resulted in a 10X increase in asset performance.
The new system offers:
- Faster asset uploads and delivery
- A new method to upload assets using GraphQL
- A new URL for serving assets
- Support for SEO-friendly URLs
- More powerful transformations
Read the documentation for migration →
#What has changed and why does it matter?
Faster and better
You can now expect your assets to upload and load much more quickly for the new projects you create.
This is because we have reworked our infrastructure - specifically, we’ve changed how we handle assets in the backend. We’ve made the switch to a file storage system that is highly available and serves assets much faster.
Moreover, when cloning projects, assets are no longer re-uploaded to the new project. This streamlines the cloning process and it doesn't matter how many assets there are, or how large they are.
A new way to upload
With the legacy system, there was a specific /upload
API endpoint for each project environment, which was used to upload a file or pass a URL from which the file can be retrieved.
We’ve departed from this workflow and with the new asset system, the asset upload workflow will be part of the GraphQL Content API.
To create a new asset, send a createAsset
mutation:
mutation createAssetExample {createAsset(data: {#Remote Asset URLuploadUrl:"https://images.unsplash.com/photo-1682687218147-9806132dc697"}) {idurl}}
Alternatively, our system will return a pre-signed upload URL for you, if you do not include a Remote URL as part of the createAsset
mutation.
Read our documentation for complete details
A different URL to serve assets from
Assets were previously served from a media.graphassets.com URL. These will now be served from a regional URL like the one below.
SEO-friendly URLs
In our current Asset Management System, if you add the file name to your media.graphassets URL, the asset won’t be accessible.
With the new system, you can create an SEO-friendly URL. You can simply do this by adding the file name to the URL as shown below:
The structure of the URL also includes the environment ID, and changes when you clone and use a different environment.
Transformations and file conversions
In our legacy system, you can only transform the size and output of the final assets.
Our new system now supports a wider range of transformations including crop
, compress
, quality
, border
, sharpen
, blur
and more.
We’d recommend reading our documentation for a complete list of all the transformations we support.
We have also made some changes in terms of the file conversions we support, and recommend going through our documentation for the complete list.
New limits
Please refer to our pricing page for specific upload size limitations, as they vary by plan. This allows you to choose the best option for your content needs.
#Activation and rollout
The Hygraph Asset Management system is now available for new projects exclusively. This means that every new Hygraph project created will have the new asset management system pre-installed and ready to use. You don't need to take any additional steps to activate it.
The legacy asset system will continue to be used for existing projects, and this will also apply to any clones of these projects.
Uncertain about which version of the asset system you're using? Refer to our documentation for more clarity.
As always, we love hearing from you - let us know what you think of the new asset management system by sharing your feedback on our Slack Channel.
Blog Author