<commit_before>Here is an example of the flow product with two images:

```
<products>
	<product external-reference="product-demo-1" >
		<name>Name</name>
		<description>Description of the product</description>
		<images>
			<url>/modules/advancedimporter/img/media/01.jpg</url> <!-- from local storage -->
			<url>http://prestashopxmlimporter.madef.fr/img/demo.jpg</url> <!-- from a server -->
		</images>
	</product>
</products>
```

It's possible to download image for categories:

```
<objects>
	<object type="category" external-reference="demo-1">
		<name>Category name</name>
		<link_rewrite>Name</link_rewrite>
		<image>/modules/advancedimporter/img/media/01.jpg</image>
	</object>
</objects>
```

## Replace old images

The module don't delete the images of a product at each importation. Each images is replaced by a new one with the same url. In other cases a new image will be created. To replace all existing images you have to use the attribute "insertion" with the value "replace":
```
<products>
	<product external-reference="product-demo-1" >
		<name>Name</name>
		<description>Description of the product</description>
		<images insertion="replace">
			<url>/modules/advancedimporter/img/media/01.jpg</url> <!-- from local storage -->
			<url>http://prestashopxmlimporter.madef.fr/img/demo.jpg</url> <!-- from a server -->
		</images>
	</product>
</products>
```

## Set legend

To add a legend, you have to use the attribute "legend":
```<commit_msg>Update 06_Images.md<commit_after>Here is an example of the flow product with two images:

```
<products>
	<product external-reference="product-demo-1" >
		<name>Name</name>
		<description>Description of the product</description>
		<images>
			<url>/modules/advancedimporter/img/media/01.jpg</url> <!-- from local storage -->
			<url>http://prestashopxmlimporter.madef.fr/img/demo.jpg</url> <!-- from a server -->
		</images>
	</product>
</products>
```

It's possible to download image for categories:

```
<objects>
	<object type="category" external-reference="demo-1">
		<name>Category name</name>
		<link_rewrite>Name</link_rewrite>
		<image>/modules/advancedimporter/img/media/01.jpg</image>
	</object>
</objects>
```

## Replace old images

The module don't delete the images of a product at each importation.

Each images is replaced by a new one with the same url. In other cases a new image will be created.

To replace all existing images you have to use the attribute "insertion" with the value "replace":
```
<products>
	<product external-reference="product-demo-1" >
		<name>Name</name>
		<description>Description of the product</description>
		<images insertion="replace">
			<url>/modules/advancedimporter/img/media/01.jpg</url> <!-- from local storage -->
			<url>http://prestashopxmlimporter.madef.fr/img/demo.jpg</url> <!-- from a server -->
		</images>
	</product>
</products>
```

## Set legend

To add a legend, you have to use the attribute "legend":
```
{'fraction_non_alphanumeric': 0.15261726716519375, 'fraction_numerical': 0.006798096532970768, 'mean_word_length': 4.264758497316637, 'pattern_counts': {'":': 4, '<': 87, '<?xml version=': 0, '>': 87, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '674081', 'n_tokens_mistral': 984, 'n_tokens_neox': 907, 'n_words': 269}