Introduction:
Media content is an integral part of any modern digital experience, and managing it effectively is crucial for delivering optimal user experiences. In this blog post, we'll delve into the concept of media variants within Flotiq, a powerful headless CMS platform, and explore how we can streamline your content management workflows.
Understanding media variants:
A variant in Flotiq refers to a modified version of an original media asset. These modifications are achieved through transformations applied to the original media, such as cropping, resizing, or other image manipulations. Variants are defined within the content type definition (CTD) schema of the media content type.
For instance, a variant named "thumbnail" might be created by resizing the original image to a smaller size suitable for use as a thumbnail. Another variant named "cropped" could be created by cropping the image to a specific aspect ratio. By offering different versions optimized for various use cases, variants allow for efficient management of media assets.
The structure of variants:
Each variant in Flotiq comprises the following elements:
- Name: A unique identifier for the variant.
- Transformation Type(s): Describes the type of transformation(s) applied to the original media.
- Transformation Parameters: Specifies the details of the transformation(s), such as dimensions or aspect ratio adjustments.
Read more details documentation about creating variants with API in Flotiq Docs.
Creating variants:
Creating variants in Flotiq is a straightforward process. Through the dashboard, you can easily edit your images in the media library and add new variants.
In order to create a variant through dashboard, simply press the edit button on any of your images in media library, and select Add new variant option.