In today’s digital world, managing product images and media for websites, apps, and online stores is crucial. For instance, imagine you’re selling products online. Each product has a main image, however, you also need smaller images for thumbnails or different sizes for your website.
This is where “asset transformation” comes into play—consequently, it helps you create these different versions of images automatically.
What is Asset Transformation?
Asset transformation is the automated process of creating different versions or formats of digital assets, such as images, to fit various needs. Additionally, it saves time by eliminating manual resizing and format adjustments for different platforms or devices.
How Does Asset Transformation Work?
Let’s take an example to make it clear.
Suppose you have an asset family “Tshirts” and it has three media file attributes.
- main_image This is usually a high-quality picture that shows the product in detail.
- thumbnail This is a small version of the main image used on product lists.
- mobile_image It is resized for smaller screens, ensuring that your product looks appealing and loads quickly on smartphones and tablets.
Navigating to Asset Transformation Settings
- Select Your Asset Family: Choose the asset family you want to customize.
- Click “Edit Family”.
- Find Transformation Option: Located in the side menu.
Defining Transformations
You set rules or instructions for how the system should create these variations. This includes specifying:
- Label: It is the name you wish to give to your transformation.
- Source Image: The “source” property specifies which attribute serves as the source for transformations across other attributes. However, it is specifically designed for media file attributes and does not apply to media link types.
- Target Image: The ‘target’ property specifies where the PIM should store newly generated variations, like “thumbnail”.When an attribute is set as a transformation target, it becomes read-only. Switching the target attribute enables editing of the previous one.
- Operations: Define changes that should be made to create each version (like resizing or changing the image quality)
Transformation Properties JSON
{ "label": "Thumbnail Transformation", "source": { "attribute": "main_image", "channel": null, "locale": null }, "target": { "attribute": "thumbnail", "channel": null, "locale": null }, "operations": [ { "type": "thumbnail", "parameters": { "width": 200, "height": 200 } } ], "filename_prefix": "thumbnail_" }, { "label": "Mobile Image Transformation", "source": { "attribute": "main_image", "channel": null, "locale": null }, "target": { "attribute": "mobile_image", "channel": null, "locale": null }, "operations": [ { "type": "resize", "parameters": { "width": 150, "height": 150 } } ], "filename_prefix": "mobile_" }
Copy and paste this JSON code into the transformation text area, and then adjust the parameters to suit your requirements. Save the transformation and then launch the transformation using the
Launch Transformation Button.
You can monitor the Transformation Job status and summary in the Process Tracker.
Navigate to the respective asset and inspect the target attributes to observe the reduced size and quality of “thumbnail” and “mobile_image”. For verification, download the images and check their size.
Understanding PIM Transformation Limitations
Supported Image Formats and Size Constraints: The PIM supports transformation only for image files with mime types like image/jpeg, image/png, image/tiff, and image/gif. It cannot generate variations for PDF or AVI files.
Memory and Size Considerations: Source image files must not exceed 16k pixels in height or width to ensure optimal performance.
Conclusion
Asset transformation simplifies image management for digital platforms by automatically creating optimized versions of asset images using operations like thumbnails, resize, colorspace, and resolution.
Please explore our Akeneo Development Services and Quality Akeneo Extensions
Be the first to comment.