Setting up product image export from 1C to 1C-Bitrix
Images are transmitted from 1C to Bitrix as part of standard CommerceML exchange. In import.xml, for each product a <Картинка> block contains relative path to image file. Files are transmitted separately — loaded to server before sending XML or in same exchange session.
How image transmission works
In CommerceML protocol, images are exported in two stages:
-
File upload. Via
POST /bitrix/admin/1c_exchange.php?type=catalog&mode=file1C uploads images to folder/bitrix/catalog_export/(or customizable exchange folder). -
XML upload.
import.xmlcontains image links:<Картинка>images/photo1.jpg</Картинка>. When parsing XML, Bitrix finds file by path and links to infoblock element.
In infoblock image goes to PREVIEW_PICTURE (preview) or DETAIL_PICTURE (detail). Additional images — to "File" type property or via \Bitrix\Iblock\PropertyTable if using multiple photos.
Configuration in 1C
In "Export to Website" processor (1C:UT, 1C:Retail etc.) must be enabled parameter "Export pictures". Without this flag XML is formed without <Картинка> blocks, and images not transmitted.
Important: 1C exports images only for goods that changed (in incremental exchange). If image added to product first time — it will be in next exchange. If image changed but other product data didn't — 1C may not include product in export. Solution: when updating image in 1C, manually "touch" the record (change any field and save).
Multiple images
By CommerceML standard for multiple images you can transmit multiple <Картинка> tags. Bitrix by default processes first image as DETAIL_PICTURE, rest are lost — if "Additional images" property in infoblock not configured.
To support image gallery:
- In infoblock create "File" type property, multiple, for example with code
MORE_PHOTO. - In
OnIBlockChangeevent handler (or post-processing agent) additional images from XML written to this property. - In template of
catalog.elementcomponent output gallery via$arResult["PROPERTIES"]["MORE_PHOTO"].
Re-export of images
During full exchange, images are re-loaded to server and re-linked to elements. This means on each exchange files overwritten. If images were edited on site side (resize, watermark) — they will overwritten with originals from 1C.
Solution: if custom processing needed — apply it via agent after exchange, don't manually edit files.
Problems with file name encoding
If file names contain Cyrillic — possible problems when transmitting via HTTP. 1C sometimes transmits file names in UTF-8, sometimes in Windows-1251. In Bitrix handler check file name encoding and if needed transliterate when saving.
Image sizes and performance
With large catalog (thousands of products with multiple images) loading images during exchange can take significant time. Recommendations:
- Enable image compression on 1C side before export (or use external resize processing)
- On Bitrix side — resize via
CFile::ResizeImageGet()with caching, not on each access - Store original files separate from resized previews







