This section explains how images (and files) are exported from InRiver and Imported into Litium Studio.
According to inRiver recomended practise, the file data type in inRiver should only be used with inRiver resource entity types. Therefore, for all other entity types, the File data type should not be used. The images and files for a entity are connected resource entities through appropriate link types.
InRiver Resource Entity
Images (and files) in InRiver are represented with a entity called "Resource" and this entity need to have special field names and types.
Following is a extract from InRiver documentation
"...
Field Types for Entity Type Resource with datatype in parenthesis. The Resource Entity Type have some special requirements on which Field Types to create, because it is tied to special logic making it possible to upload image files into the database that will be associated with the Resource entities.
- ResourceFileId (File). This Field Type must be present on the Resource Entity Type. It represents an Id to associate this entity to a file in the database, the value will be set automatically during the upload process. Boolean properties set to true: ReadOnly. Category: ResourceGeneral
- ResourceFilename (String). This Field Type must be present on the Resource Entity Type. It represents the filename of the uploaded file and will be set automatically during the upload process. Boolean properties set to true: ReadOnly. Category: ResourceGeneral
- ResourceMimeType (String), This Field Type represent a technical property extracted from the image file during the upload process. Boolean properties set to true: ReadOnly. Category: ResourceGeneral
- ResourceName (LocaleString). Boolean properties set to true: Display Name. Category: ResourceGeneral
..."
Image/file field mappings
Litium Studio InRiver Connector uses the InRiver linkType as the image(or file) field in the product group and article templates according to following scheme.
- ItemResource InRiver LinkType(s) will result in image (or file) fields created in article template, with variant group field attribute set to false.
- ProductResource InRiver LinkType(s) will result in image (or file) fields created in article template, with variant group field attribute set to true.
- ChannelNodeResource LinkType(s) will result in image (or file) fields created in product group template, with variant group field attribute set to false.
Litium Studio field name(s) and field group
You can change the name of the litium studio fields created by the configuration setting option (in Litium.Studio.AddOns.InRiver.dll.config) "resourceFieldNames" and define to which field group the resource fields belongs to by using "resourceFieldGroups".
In the below example, inRiver ChannelNodeResource links will become images in Litium Studio with a field name Image0. All the image fields in Studio will be grouped under "Display images".
For each image mapped, the field name used is the inRiver LinkTypeId prefixed with a number starting from zero or one according to the "useZeroBasedFieldNameIndex" in the configuration file(to denote the number of images).
The sort order of images will be the same as in inRiver.
Following is a example showing image fields generated for a custom link type called CategoryDisplayImage

Number of Images/Files
By default the number of images transfered is limited to 1, and only one Litium Studio property field is created.
This means that only the first image linked to an InRiver entity will be transfered by default.
To have multiple images:
Set the number of images in the Connector Setting (\\Program Files\inRiver AB\inRiver Connect\OutboundConnectors\Litium.Studio.AddOns.InRiver.dll.config):
noOfImagesInResourceLinkTypeId: No of images contained in each inRiver link type that connects resources to entities.
Format: "<LinkTypeId>:<No of resources>,<LinkTypeId>:<No of resources>"
e:g: "ProductResource:6, ItemResource:6, ChannelNodeResource:1"
<pluginSettings
...
channelId="2004"
articleNumberFieldTypeId=""
articleDisplayTemplateName="Accelerator variant listing"
noOfImagesInResourceLinkTypeId="ChannelNodeResource:1, PrimaryImage:1, SettingImage:1, FamilyImage:1, FunctionImage:1, ConceptMiniature:1, UserManual:1, CategoryPromise:1"
resourceFieldNames="ChannelNodeResource:Image, PrimaryImage:Image"
resourceFieldGroups="ProductResource:Display images, PrimaryImage:Display images, SettingImage:Display images, FamilyImage:Display images, FunctionImage:Display images, ChannelNodeResource:Display images, ConceptMiniature:Display images, CategoryPromise:Display images"
resourceConfiguration="Original"
defaultResourceFileExtension=".jpg"
....
>
</pluginSettings>
Media archive
All images are placed into the media archive folder named "InRiverResources". The file name is the inRiver entity id followed by the extension. The inRiver fields of the resource entity are transfered as meta data to a particular image.

Using Image Magic to resize inRiver images
You may use external plugins such as Image magic to resize and rescale inRiver images. Check the inRiver documentation in inRiver wiki on how to configure image magic and similar software for rescaling and resizing.
When you do this, you will be using a inRiver server setting called "resourceConfiguration".
You need to specify this also in the \\Program Files\inRiver AB\inRiver Connect\OutboundConnectors\Litium.Studio.AddOns.InRiver.dll.config file setting resourceConfiguration
e.g.
defaultResourceConfiguration="Original"
When you have multiple resource configurations for the same inRiver resource, to pick the correct resource configuration you want, set the resourceConfiguration setting.
Format "<File extension>:<resource configuration name>, <File extension>:<resource configuration name>"
Example:
resourceConfiguration = ".jpg:StudioCustom, .pdf:Original"
Above example setting will make the connector to export all resources with .pdf extension using the original resource configuration, and all resources with .jpg extension to use the StudioCustom resource configuration.