---
title: Asset importer
slug: commerce-connect-15/docs/asset-importer
docTags: 
createdAt: 2026-07-30T20:34:40.000Z
---

:::hint{type="info"}
**Notes**
Optimizely uses the Optimizely asset system by default. To enable the *legacy* asset management system, set the `UseLegacyAssetSystem` configuration setting to `true` in the `appSettings.json` files of both the Commerce Connect Manager and the front-end sites.

Be aware that the legacy asset system is not available in Commerce Connect version 11 and up. Also, Optimizely recommends using the [Service API](docId\:dvggu2_Y41Ee6NxmqNtAE) instead of Asset Importer to import assets and link them to products.
:::

## Download Asset Importer

The Asset Importer is available on GitHub.

1. Go to [https://github.com/episerver/AssetImporter](https://github.com/episerver/AssetImporter).
2. Clone the repository.

## Use Asset Importer

Syntax of the `AssetImporter` command:

`AssetImporter <mapping_asset_file> <asset_folder> <commerce_core_site_path> [asset_root] [-uselegacy] [-byasset] [-verbose]`

The command parameters are as follows:

- `mapping_asset_file` – A CSV file that contains mapping between products/variants and assets.
- `asset_folder` – The folder that contains assets to be imported.
- `commerce_core_site_path` – The physical path to the Commerce Connect site.
- `asset_root` (optional) – The name of the asset folder to which assets will be imported. If not provided, the default is *Catalogs*.
- `-uselegacy` (optional) – Indicates whether the `AssetImporter` uses the legacy asset system.
- `-byasset` (optional) – Indicates that the file structure from the asset\_folder is kept intact for the import. The default when importing is to create a structure with the products, groups and, finally, assets.
- `-verbose` (optional) – Enables detailed logging of the asset import process.

The structure of CSV asset file is as follows:

- The first row of the file contains headers.
- There are at least 2 columns in the file: the **Catalog Node/Entry** code and the asset file name. The first column is the **Catalog Node/Entry** code that the asset is associated with. But if the first header contains the word *asset*, the content of the first column is interpreted as the asset file name.
- The third column is optional. It is the asset sort order if the **Catalog Node/Entry** has more than one asset.

**CSV file example**

```text
Variation Code,Image ID
Jackets-Peacoats-Hooded,Jackets-Peacoats-Hooded.jpg
Jackets-Peacoats-Ruffle,Jackets-Peacoats-Ruffle.jpg
Jackets-Peacoats-Asymmetrical,Jackets-Peacoats-Asymmetrical.jpg
65990B,400x300.png
72008B,400x300.png
24215B,400x300.png
Fashion,400x300.png,0
Fashion,980x150.png,2
Fashion,980x300.png,1
```

:::hint{type="info"}
**Note**
If you have multiple groups in the asset folder, you only need to have one line in the CSV file. The import automatically imports files with the same name from the existing asset groups.
:::

## Import assets as CMS-based content

Commerce Connect uses the Optimizely asset system. To import using Asset Management as Optimizely Content Management System (CMS)-based content, use the following command:

`AssetImporter <mapping_asset_file> <asset_folder> <commerce_core_site_path> [asset_root]`

If the CMS already has asset-based content, use the `-mappingonly` parameter to associate asset content with Catalog Node/Entry.

`AssetImporter <mapping_asset_file> '' <commerce_core_site_path> -mappingonly`

## Import assets as legacy ECF assets

Commerce Connect uses the ECF BLOB Provider to manage the asset files and add the asset to Catalog Node/Entry through the **Asset** tab in **Catalog Management**.

To import using the legacy Asset Management system, use the `uselegacy` parameter:

`AssetImporter <mapping_asset_file> <asset_folder> <commerce_core_site_path> [asset_root] uselegacy`
