How to import my PIM images?

#What "images" are we talking about exactly!?

Akeneo PIM Enterprise Edition has 2 ways to store images for your products.

Either with several Image attributes or with the Asset collection attribute that points to one or more images from the Assets management feature (Akeneo PIM Enterprise Edition only).

  • Akeneo Connector for Magento 2 Community Edition can retrieve images from Image attributes only.
  • Akeneo Connector for Magento 2 Enterprise Edition can retrieve images from either Image attributes AND from Asset collection attributes.
    • You can use multiple image attributes and multiple asset collection attributes.

Please note that since Akeneo Connector version 100.3.1 and due to a compatibility issue with Magento 2.3.3, the connector renames images and asset files from Akeneo by limiting their length to 80 characters. It also adds a hash composed of four random characters at the end of the file name to ensure the uniqueness of the file.

Also note that all existing product images will be renamed during import after updating to version 100.3.1.

#How can I retrieve images from "Image" attributes?

In the connector configuration page, in Products, you can retrieve images from PIM Image attributes with the following parameters:

First, select Yes if you want to import images:

Connector parameter Magento information
Import media file Yes or No

Then, list all your PIM Ìmage attributes:

Connector parameter PIM information
Akeneo Attributes for Image Gallery PIM Image attribute ID

Finally, define the mapping between PIM Image attribute and Magento Image types:

Connector parameter Magento information PIM information
Product Image Association image(image) PIM Image attribute ID
small_image(small_image)
thumbnail(thumbnail)
swatch_image(swatch_image)

#How can I retrieve images from "Asset collection" attributes?

This feature is only available for Akeneo Connector for Magento 2 Enterprise Edition.

If you don't use the PIM Image attribute but the Asset collection attribute for your images, in the connector configuration page, in Products, select Yes to retrieve images from Asset collection attributes :

Connector parameter Magento information
Import Asset Files Yes or No

As Magento 2 can't handle binary videos or files (like PDF), please note that the current version of Akeneo Connector for Magento 2 only imports images from PIM assets (no video, no file).

The connector imports PIM asset images in the same order as what has been defined in the PIM at the level of asset collection attributes type.

#How can I define the "base" image?

#With Image attributes

Akeneo Connector for Magento 2 assigns the attributes defined in the Product Image Association mapping to each corresponding Magento 2 image types for the product.

If the mapping is not specified for the type image, no images will be set as base image in Magento 2.

#With Assets collection attributes

Akeneo Connector for Magento 2 takes the first image of the first configured asset collection attribute to define which image will be the base image in Magento 2 for your product.

In Akeneo PIM, please be aware you could change the image order for an asset collection attribute with a simple drag & drop action.

#With Image AND Assets collection attributes

If specified, Akeneo Connector for Magento 2 assigns the attributes defined in the Product Image Association mapping to each corresponding Magento 2 image types for your product.

If the mapping is not specified, all Magento 2 image types will be assigned to the first image of the first configured asset collection attribute.

#So, can I use "Image" AND "Asset collection" simultaneously ?

Yes (since version 100.2.1)! Please refer to this list to understand how Akeneo Connector will import your images:

  • Import Media Files at Yes and Import Asset Files at No. Only specified media attributes will be imported. Magento Image types will follow your mapping specified in Product Image Association.

  • Import Media Files at No and Import Asset Files at Yes. Only your specified assets collections will be imported. All default Magento Image types will be assigned to the first file imported.

  • Import Media Files at Yes and Import Asset Files at Yes and an empty Product Image Association Your specified media attributes AND asset collections will be imported. All default Magento Image types will be assigned to the first image of the first asset collection.

  • Import Media Files at Yes and Import Asset Files at Yes and a mapping in Product Image Association Your specified media attributes AND asset collections will be imported. Magento Image types follow your mapping specified in Product Image Association. Only the Image types you specified will be filled.