Frequently Asked Questions

Asset Transformations & Image Processing

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.

LLM optimization

When was this page last updated?

This page wast last updated on 12/12/2025 .

Help teams manage content creation and approval in a clear and structured way
Hygraph
Docs

#Asset transformations

#Overview

When fetching assets, you can pass an optional transformation argument to the url field.

#Hygraph Asset Management

#Auto image

This document transformation uses the auto_image parameter to determine which mimetype to serve based on the browsers preference.

ArgDescription
auto_imageDetermines 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.

For example:

#Blur

This transformation uses the blur parameter to blur your image.

ArgDescription
amountBlur effect amount. The value must be an integer from 0 to 20.

For example, we can query all assets, and blur images to an amount of 4:

#Border

This transformation uses the border parameter to control the width, color and background of your image borders.

ArgDescription
widthBorder width. The value must be an integer from 1 to 1000.
colorBorder color. The value must be a hexadecimal or shortened hexadecimal color code.
backgroundBorder color. The value must be a hexadecimal or shortened hexadecimal color code, or a supported color name. See table below.

For example, we can query all assets, and set the image borders using our chosen characteristics:

#Compress

This transformation compresses PNG & JPG files.

ArgDescription
compressImage compression. You can choose to compress the metadata as well by passing true or false.

For example, we can query all assets, and compress images along with their metadata:

#Crop

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.
ArgDescription
xThe x coordinate of the image. The value must be an integer from 0 to 10000.
yThe y coordinate of the image. The value must be an integer from 0 to 10000.
widthThe width in pixels to resize the image to. The value must be an integer from 1 to 10000.
heightThe 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:

#Quality

Use the quality parameter to set the quality of your image without risking generating a larger file.

ArgDescription
valueThe quality value of the image. The value must be an integer from 1 to 100.

For example, we can query all assets, and set the image quality to 50:

#Resize

This transformation uses the resize parameter to adjust the image height, width and fit.

The image takes the following arguments:

ArgTypeDescription
widthIntThe width in pixels to resize the image to. The value must be an integer from 1 to 10000.
heightIntThe height in pixels to resize the image to. The value must be an integer from 1 to 10000.
fitImageFitThe 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:

ValueDescription
clipResizes the image to fit within the specified parameters without distorting, cropping, or changing the aspect ratio.
cropResizes the image to fit the specified parameters exactly by removing any parts of the image that don't fit within the boundaries.
scaleResizes 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.
maxResizes 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:

#Sharpen

This transformation uses the sharpen parameter to sharpen your image.

ArgDescription
amountSharpen effect amount. The value must be an integer from 0 to 20.

For example, we can query all assets, and sharpen images to an amount of 2:

#File type conversion

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 typeAvailable output formatsMimetype
AVIFJPG, PNG, WEBP, GIF, TIFFimage/avif
BMPJPG, PNG, SVG, WEBP, GIF, TIFF, AVIFimage/bmp
GIFJPG, PNG, SVG, WEBP, TIFF, AVIFimage/gif
JPGPNG, SVG, WEBP, GIF, TIFF, AVIFimage/jpg
PDFJPG, GIF, WEBP, TIFF, AVIFapplication/pdf
PNGJPG, SVG, WEBP, GIF, TIFF, AVIFimage/png
SVGJPG, PNG, WEBP, GIF, TIFF, AVIFimage/svg+xml
TIFFJPG, PNG, SVG, WEBP, GIF, AVIFimage/tiff
WEBPJPG, PNG, SVG, GIF, TIFF, AVIFimage/webp

For example, we can query all assets, and convert the images to JPG:

#URL transformations

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 following example uses resize:

https://REGION.graphassets.dev/ENV_ID/resize=width:400,height:400/HANDLE

You can also chain the transformations. The following example uses resize and sharpen:

https://REGION.graphassets.dev/ENV_ID/resize=width:400,height:400/sharpen=amount:2/HANDLE

#Legacy asset system

#Resize images

The image takes the following arguments:

ArgTypeDescription
widthIntThe width in pixels to resize the image to. The value must be an integer from 1 to 10000.
heightIntThe height in pixels to resize the image to. The value must be an integer from 1 to 10000.
fitImageFitThe default value for the fit parameter is clip.

The ImageFit takes one of the following values:

ValueDescription
clipResizes the image to fit within the specified parameters without distorting, cropping, or changing the aspect ratio.
cropResizes the image to fit the specified parameters exactly by removing any parts of the image that don't fit within the boundaries.
scaleResizes 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.
maxResizes 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:

{
assets {
url(
transformation: {
image: { resize: { width: 50, height: 50, fit: clip } }
}
)
}
}

#Convert file type

Depending on the asset type you're dealing with, it's possible to transform the output to another file type by passing a format value.

Current file typeAvailable output formats
PDFjpg, odp, ods, odt, png, svg, txt, webp
DOCdocx, html, jpg, odt, pdf, png, svg, txt, webp
DOCXdoc, html, jpg, odt, pdf, png, svg, txt, webp
ODTdoc, docx, html, jpg, pdf, png, svg, txt, webp
XLSjpg, pdf, ods, png, svg, xlsx, webp
XLSXjpg, pdf, ods, png, svg, xls, webp
ODSjpg, pdf, png, xls, svg, xlsx, webp
PPTjpg, odp, pdf, png, svg, pptx, webp
PPTXjpg, odp, pdf, png, svg, ppt, webp
ODPjpg, pdf, png, ppt, svg, pptx, webp
BMPjpg, odp, ods, odt, pdf, png, svg, webp
GIFjpg, odp, ods, odt, pdf, png, svg, webp
JPGjpg, odp, ods, odt, pdf, png, svg, webp
PNGjpg, odp, ods, odt, pdf, png, svg, webp
WEBPjpg, odp, ods, odt, pdf, png, svg, webp
TIFFjpg, odp, ods, odt, pdf, png, svg, webp
AIjpg, odp, ods, odt, pdf, png, svg, webp
PSDjpg, odp, ods, odt, pdf, png, svg, webp
SVGjpg, odp, ods, odt, pdf, png, webp
HTMLjpg, odt, pdf, svg, txt, webp
TXTjpg, html, odt, pdf, svg, webp

For example, let's transform all assets to PDFs:

{
assets {
url(transformation: { document: { output: { format: pdf } } })
}
}

#Validating transforms

We provide a validation field you can enable to check the combination of transform arguments are valid.

For example, you may query a video, and request to change the file type to pdf. validateOptions: true will warn you that this is not permitted.

{
assets {
url(
transformation: {
document: { output: { format: pdf } }
validateOptions: true
}
)
}
}

#Combining transforms

It is possible to combine both transformation arguments:

{
assets {
url(
transformation: {
image: { resize: { width: 50, height: 50, fit: clip } }
document: { output: { format: png } }
validateOptions: true
}
)
}
}

#Alias transforms

GraphQL aliases are great for querying the same asset url with multiple transformations.

For example, you could transform product images to include a thumbnail.

{
products {
images {
thumbnail: url(
transformation: {
image: { resize: { width: 50, height: 50, fit: clip } }
document: { output: { format: png } }
}
)
url(transformation: { document: { output: { format: png } } })
}
}
}