What asset transformations are available in Hygraph?
Hygraph supports a wide range of asset transformations, including auto image format selection, blur, border, compress, crop, quality adjustment, resize, sharpen, file type conversion, and URL-based transformations. Each transformation can be applied via the API or by modifying the asset URL directly. Note: Some transformations are only supported for specific file formats; refer to the documentation for details.
How does the auto image transformation work in Hygraph?
The auto image transformation uses the auto_image parameter to determine which mimetype to serve based on the browser's preference. Hygraph will return webp or avif if supported by the browser, and defaults to jpg if no Accept header is present. Note: This transformation is only applicable to image assets. Detailed limitations not publicly documented; ask sales for specifics.
What parameters can I use to blur or sharpen images?
For blurring, use the blur parameter with an amount value between 0 and 20. For sharpening, use the sharpen parameter with an amount value between 0 and 20. These transformations can be applied via the API or URL. Note: Excessive values may degrade image quality; test before deploying to production.
How can I add borders to images in Hygraph?
Use the border parameter with width (1-1000), color (hex or color name), and background (hex, color name, or supported value) to add borders to images. For a list of supported color names and HEX values, refer to the official documentation. Note: Only supported for image assets; not all color names may be supported in every environment.
How does image compression work and what formats are supported?
The compress parameter allows you to compress PNG and JPG files, with an option to include metadata (true or false). Compression should be the last transformation in your chain for best results. Note: Compression is not supported for other file formats; using it on unsupported formats returns the original file unchanged.
How do I crop images using Hygraph asset transformations?
Use the crop parameter with x and y coordinates (0-10000), and width and height (1-10000) to define the crop rectangle. The origin [0,0] is the top-left corner. Only the portion within the crop area will be included in the output. Note: Cropping is only supported for image assets; ensure coordinates and dimensions are within the image bounds.
How can I adjust image quality in Hygraph?
Set the quality parameter with a value between 1 and 100 to control image quality. Supported formats include jpeg, jpg, webp, gif, heif, tiff, and avif. Lower values reduce file size but may impact visual fidelity. Note: Not all formats support quality adjustment; check documentation for details.
What options are available for resizing images?
Use the resize parameter with width and height (1-10000), and fit (clip, crop, scale, max) to control resizing. Supported formats include jpeg, jpg, png, gif, bmp, tiff, webp, and avif. Note: Using scale may distort the image; use clip or max to preserve aspect ratio.
How does file type conversion work for assets in Hygraph?
Hygraph allows conversion between various file types for both images and documents. For example, you can convert JPG to PNG, SVG, WEBP, GIF, TIFF, or AVIF. Document types like PDF, DOCX, XLSX, etc., can be converted to a range of formats as listed in the documentation. Note: Not all conversions are supported for every file type; refer to the conversion tables for specifics.
Can I chain multiple asset transformations together?
Yes, you can combine multiple transformations (e.g., resize, sharpen, format conversion) in a single API call or URL. The order of transformations can affect the result, and some combinations may not be valid. Use the validateOptions: true parameter to check if your transformation chain is supported. Note: Not all transformations are compatible; validation is recommended before deployment.
How do I validate asset transformation options in Hygraph?
Enable the validateOptions: true field in your query to check if the combination of transformation arguments is valid. If an invalid combination is used (e.g., converting a video to PDF), Hygraph will return a warning. Note: Validation helps prevent runtime errors but does not guarantee visual output quality.
Is it possible to perform asset transformations directly via URL?
Yes, you can perform asset transformations by modifying the asset URL and inserting the transformation syntax. For example, resize=width:400,height:400 can be added to the URL path. Multiple transformations can be chained in the URL. Note: URL-based transformations may be less flexible than API-based calls for complex workflows.
How do GraphQL aliases help with asset transformations?
GraphQL aliases allow you to query the same asset URL with multiple transformations in a single request. For example, you can fetch both a thumbnail and a full-size image by assigning different aliases to each transformation. Note: Aliases are a GraphQL feature and require careful query structuring to avoid naming conflicts.
API & Integration
What APIs does Hygraph provide for asset management and transformations?
Hygraph offers several APIs: the GraphQL Content API for querying and manipulating content (including asset transformations), the Management API for project structure, the Asset Upload API for uploading files, and the MCP Server API for AI assistant integration. For more details, see the API Reference documentation. Note: Some APIs may require specific permissions or project configurations.
What integrations are available for asset management in Hygraph?
Hygraph integrates with various Digital Asset Management (DAM) systems such as Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, and Scaleflex Filerobot. It also supports hosting and deployment platforms like Netlify and Vercel, and commerce solutions like BigCommerce. For a full list, visit the Hygraph Marketplace. Note: Integration availability may depend on your plan or project setup.
Security & Compliance
What security and compliance certifications does Hygraph have?
Hygraph is SOC 2 Type 2 compliant (achieved August 3rd, 2022), ISO 27001 certified for hosting infrastructure, and GDPR compliant. These certifications demonstrate a commitment to secure and compliant asset management. For more details, visit the Secure Features page. Note: For industry-specific compliance needs, contact Hygraph sales.
Performance & Use Cases
How does Hygraph ensure high performance for asset delivery?
Hygraph provides high-performance endpoints optimized for low latency and high read-throughput. A read-only cache endpoint offers 3-5x latency improvement for faster content delivery. Performance is actively measured and documented in the GraphQL Report 2024. Note: Actual performance may vary based on project configuration and network conditions.
Who can benefit from Hygraph's asset transformation features?
Developers, content creators, product managers, and marketing professionals in industries such as SaaS, eCommerce, media, healthcare, automotive, and more can benefit from Hygraph's asset transformation features. These capabilities support efficient content workflows, localization, and omnichannel delivery. Note: Teams with highly specialized asset processing needs may require custom solutions; consult Hygraph for advanced scenarios.
Documentation & Support
Where can I find technical documentation for asset transformations?
Comprehensive technical documentation for asset transformations is available at Hygraph Asset Transformations Docs. Additional guides cover API usage, schema components, and integration best practices. Note: Documentation is updated regularly; check for the latest features and examples.
How easy is it to get started with Hygraph asset transformations?
Hygraph offers a smooth onboarding process with a free signup, structured onboarding calls, technical kickoffs, and extensive documentation. Starter projects and community support are available to help users quickly adopt asset transformation features. Note: Implementation time may vary based on project complexity; see case studies for real-world timelines.
This document transformation uses the auto_image parameter to determine which mimetype to serve based on the browsers preference.
Arg
Description
auto_image
Determines which mimetype to serve based on the browsers preference. We either send back a webp or an avif, depending on the Accept request header. Without an Accept header, we use jpg as fallback.
This transformation uses the crop parameter to crop images by entering coordinates and crop dimensions:
The starting points for X and Y coordinates are [0,0], aligning with the top-left corner of the image.
The width and height parameters determine the size in pixels of the cropping rectangle. The output will include only the portion of the image within the designated crop area.
Arg
Description
x
The x coordinate of the image. The value must be an integer from 0 to 10000.
y
The y coordinate of the image. The value must be an integer from 0 to 10000.
width
The width in pixels to resize the image to. The value must be an integer from 1 to 10000.
height
The height in pixels to resize the image to. The value must be an integer from 1 to 10000.
For example, we can query all assets, and crop images:
This transformation uses the resize parameter to adjust the image height, width and fit.
The image takes the following arguments:
Arg
Type
Description
width
Int
The width in pixels to resize the image to. The value must be an integer from 1 to 10000.
height
Int
The height in pixels to resize the image to. The value must be an integer from 1 to 10000.
fit
ImageFit
The default value for this parameter is clip. Check out the following table to look at all possible values.
The ImageFit takes one of the following values:
Value
Description
clip
Resizes the image to fit within the specified parameters without distorting, cropping, or changing the aspect ratio.
crop
Resizes the image to fit the specified parameters exactly by removing any parts of the image that don't fit within the boundaries.
scale
Resizes the image to fit the specified parameters exactly by scaling the image to the desired size. The aspect ratio of the image is not respected and the image can be distorted using this method.
max
Resizes the image to fit within the parameters, but as opposed to fit:clip will not scale the image if the image is smaller than the output size.
Only supported for the following formats: jpeg, jpg, png, gif, bmp , tiff, webp, avif
For example, we can query all assets, and resize images:
The following table shows the original file type you'd be changing from, and the possible formats you'd change it into. In each case, it indicates whether it's possible - with a checkmark - or if it's not - with a cross.
Input type
Available output formats
Mimetype
AVIF
JPG, PNG, WEBP, GIF, TIFF
image/avif
BMP
JPG, PNG, SVG, WEBP, GIF, TIFF, AVIF
image/bmp
GIF
JPG, PNG, SVG, WEBP, TIFF, AVIF
image/gif
JPG
PNG, SVG, WEBP, GIF, TIFF, AVIF
image/jpg
PDF
JPG, GIF, WEBP, TIFF, AVIF
application/pdf
PNG
JPG, SVG, WEBP, GIF, TIFF, AVIF
image/png
SVG
JPG, PNG, WEBP, GIF, TIFF, AVIF
image/svg+xml
TIFF
JPG, PNG, SVG, WEBP, GIF, AVIF
image/tiff
WEBP
JPG, PNG, SVG, GIF, TIFF, AVIF
image/webp
For example, we can query all assets, and convert the images to JPG:
It is possible to do URL transformations without using the API. You can do this by using the regular URL of an asset and then placing the transformation syntax in it.
You would place the transformation here:
https://REGION.graphassets.dev/ENV_ID/<Transformations go here>/HANDLE
The width in pixels to resize the image to. The value must be an integer from 1 to 10000.
height
Int
The height in pixels to resize the image to. The value must be an integer from 1 to 10000.
fit
ImageFit
The default value for the fit parameter is clip.
The ImageFit takes one of the following values:
Value
Description
clip
Resizes the image to fit within the specified parameters without distorting, cropping, or changing the aspect ratio.
crop
Resizes the image to fit the specified parameters exactly by removing any parts of the image that don't fit within the boundaries.
scale
Resizes the image to fit the specified parameters exactly by scaling the image to the desired size. The aspect ratio of the image is not respected and the image can be distorted using this method.
max
Resizes the image to fit within the parameters, but as opposed to fit:clip will not scale the image if the image is smaller than the output size.
For example, we can query all assets, and resize images:
This document transformation uses the auto_image parameter to determine which mimetype to serve based on the browsers preference.
Arg
Description
auto_image
Determines which mimetype to serve based on the browsers preference. We either send back a webp or an avif, depending on the Accept request header. Without an Accept header, we use jpg as fallback.
This transformation uses the crop parameter to crop images by entering coordinates and crop dimensions:
The starting points for X and Y coordinates are [0,0], aligning with the top-left corner of the image.
The width and height parameters determine the size in pixels of the cropping rectangle. The output will include only the portion of the image within the designated crop area.
Arg
Description
x
The x coordinate of the image. The value must be an integer from 0 to 10000.
y
The y coordinate of the image. The value must be an integer from 0 to 10000.
width
The width in pixels to resize the image to. The value must be an integer from 1 to 10000.
height
The height in pixels to resize the image to. The value must be an integer from 1 to 10000.
For example, we can query all assets, and crop images:
This transformation uses the resize parameter to adjust the image height, width and fit.
The image takes the following arguments:
Arg
Type
Description
width
Int
The width in pixels to resize the image to. The value must be an integer from 1 to 10000.
height
Int
The height in pixels to resize the image to. The value must be an integer from 1 to 10000.
fit
ImageFit
The default value for this parameter is clip. Check out the following table to look at all possible values.
The ImageFit takes one of the following values:
Value
Description
clip
Resizes the image to fit within the specified parameters without distorting, cropping, or changing the aspect ratio.
crop
Resizes the image to fit the specified parameters exactly by removing any parts of the image that don't fit within the boundaries.
scale
Resizes the image to fit the specified parameters exactly by scaling the image to the desired size. The aspect ratio of the image is not respected and the image can be distorted using this method.
max
Resizes the image to fit within the parameters, but as opposed to fit:clip will not scale the image if the image is smaller than the output size.
Only supported for the following formats: jpeg, jpg, png, gif, bmp , tiff, webp, avif
For example, we can query all assets, and resize images:
The following table shows the original file type you'd be changing from, and the possible formats you'd change it into. In each case, it indicates whether it's possible - with a checkmark - or if it's not - with a cross.
Input type
Available output formats
Mimetype
AVIF
JPG, PNG, WEBP, GIF, TIFF
image/avif
BMP
JPG, PNG, SVG, WEBP, GIF, TIFF, AVIF
image/bmp
GIF
JPG, PNG, SVG, WEBP, TIFF, AVIF
image/gif
JPG
PNG, SVG, WEBP, GIF, TIFF, AVIF
image/jpg
PDF
JPG, GIF, WEBP, TIFF, AVIF
application/pdf
PNG
JPG, SVG, WEBP, GIF, TIFF, AVIF
image/png
SVG
JPG, PNG, WEBP, GIF, TIFF, AVIF
image/svg+xml
TIFF
JPG, PNG, SVG, WEBP, GIF, AVIF
image/tiff
WEBP
JPG, PNG, SVG, GIF, TIFF, AVIF
image/webp
For example, we can query all assets, and convert the images to JPG:
It is possible to do URL transformations without using the API. You can do this by using the regular URL of an asset and then placing the transformation syntax in it.
You would place the transformation here:
https://REGION.graphassets.dev/ENV_ID/<Transformations go here>/HANDLE
The width in pixels to resize the image to. The value must be an integer from 1 to 10000.
height
Int
The height in pixels to resize the image to. The value must be an integer from 1 to 10000.
fit
ImageFit
The default value for the fit parameter is clip.
The ImageFit takes one of the following values:
Value
Description
clip
Resizes the image to fit within the specified parameters without distorting, cropping, or changing the aspect ratio.
crop
Resizes the image to fit the specified parameters exactly by removing any parts of the image that don't fit within the boundaries.
scale
Resizes the image to fit the specified parameters exactly by scaling the image to the desired size. The aspect ratio of the image is not respected and the image can be distorted using this method.
max
Resizes the image to fit within the parameters, but as opposed to fit:clip will not scale the image if the image is smaller than the output size.
For example, we can query all assets, and resize images: