# Edit media names

{% hint style="info" %}
Batch actions work in the background; when they are fully executed, you will see confirmation in the [Action center](https://usermanual.ergonode.com/dashboard/dashboard/user-menu-and-action-center) and a new entry in [Activities](https://usermanual.ergonode.com/system/activities/batch-actions).
{% endhint %}

{% hint style="info" %}
**Additional information:**

* Only global-type attributes are supported.
* Supported attribute types are the same as with variables in TEXT\_AREA type attributes, the list can be found here: [LINK](https://usermanual.ergonode.com/product-design/attributes/attribute-variables)
* Medium has to be related only to one product.
* If a single medium is used in many attributes within the product, then the system will change its name only once, in the first attribute.
* If the variable has an empty value, then, in effect, it will be empty in the file name.
* The count suffix (…01, …02…) is always added in the product context.
* The limit on the file name length is 128 characters.
* The forward slash “/” is not allowed in the media name.&#x20;
  {% endhint %}

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FGEYqupaRwMsSqRlu8E1D%2Fimage.png?alt=media&#x26;token=54f20780-3789-4b3d-9f75-7150245079c0" alt=""><figcaption></figcaption></figure>

## Attributes containing media

Start by selecting the attributes you want to change the media names in.

{% hint style="info" %}
The name suffix (01, 02, 03, etc.) will be applied in the order of the selected attributes.
{% endhint %}

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FaTiolaHFKUPWhBy62Cd7%2Fimage.png?alt=media&#x26;token=229feddd-a0a1-49c4-b2e9-30b1308e7d18" alt=""><figcaption></figcaption></figure>

Choose the naming method for your media name format.

## Media name format - Naming method

### Based on attribute values

Using this method you can use a custom string and/or a variable.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FYhCzKHVEFJEdufgLCO2r%2Fimage.png?alt=media&#x26;token=91d4fcb2-8d0a-457c-8cc9-0b7b203f0e7e" alt=""><figcaption></figcaption></figure>

The next step is to choose a language to pull variable values from. It's required to do so even if variables are not used to create a new media name.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2Fl8blpNcncsdzzAXiXbPD%2Fimage.png?alt=media&#x26;token=ada7756e-2307-405f-96b2-618b7f1395bc" alt=""><figcaption></figcaption></figure>

Click on *Edit media names* to start the renaming process.&#x20;

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2Fhbo0sUiiFFajduyvnXZ6%2Fimage.png?alt=media&#x26;token=22314d85-8d33-4ba6-8cea-6a016765aef7" alt=""><figcaption></figcaption></figure>

When it's done, the system will send a notification via the Action center.

**Example configuration:**

* Media name format `#name-#type-#color-`
* Language of variables `English (United Kingdom)`
* Attributes with media to be renamed `Main image, Gallery`

**Sample effect for a single product:**

* Assume that the product has the following values:\
  `#name: "Adidas Shoes"`\
  `#type: "Casual"`\
  `#color: "Black"`
* Value `image1.jpg` in attribute `Main image` change its name to `Adidas Shoes-Casual-Black-01.jpg`
* Value `gallery_image001.jpg` in attribute `Gallery` change its name to `Adidas Shoes-Casual-Black-02.jpg`
* Value `gallery_image002.jpg` in attribute `Gallery` change its name to `Adidas Shoes-Casual-Black-03.jpg`
* Value `gallery_image003.jpg` in attribute `Gallery` change its name to `Adidas Shoes-Casual-Black-04.jpg`

### Based on product SKU

This method does not need any additional configuration.

**Example configuration:**

* Assume that the product has the following values:

`#SKU: "001"`

`#total number of files in selected attributes: 4`

{% hint style="info" %}
The order in which attributes are selected defines the incrementation order. If "Main image" was selected first, the first file in that attribute will start the process, then the system will proceed with the rest of the files in that attribute and then will start changing the names of files in the "Gallery" attribute.
{% endhint %}

Attributes with media to be renamed `Main image, Gallery`

**Sample effect for a single product:**

* Value `image1.jpg` in attribute `Main image` change its name to `001-01.jpg`
* Value `gallery_image001.jpg` in attribute `Gallery` change its name to `001-02.jpg`
* Value `gallery_image002.jpg` in attribute `Gallery` change its name to `001-03.jpg`
* Value `gallery_image003.jpg` in attribute `Gallery` change its name to `001-04.jpg`
