Import media using impex in Hybris

Hybris Logo

1. Overview

In this article, I will show you the different ways to import media using impex.

In Hybris there are 4 ways to import the media using impexes : absolute path, JAR based path, ZIP based path and URL based path.

The MediaDataTranslator.class determines the type of the path based on it’s prefix.

1.1. Absolute Path

The Absolute path starts with file: as a prefix.


INSERT_UPDATE Media	;...;@media[];mime[default='image/jpeg']

1.2. JAR based path

The JAR based path starts with jar: and composed of two parts separated by & : a class loader name and a media relative path.

E.g : For a media called hello.jpg located in resources/yinitialdata/images directory of the yinitialdata extension.

## For this example the Class loader is : com.stackextend.initialdata.setup.initialdatasystemsetup


INSERT_UPDATE Media	;...;@media[];mime[default='image/jpeg']

1.3. ZIP based path

The ZIP based path starts with zip: and composed of two parts separated by & : the path to the Zip file and the path to Zip entry.

E.g : For a Zip file called, and contains a file (entry) called hello.jpg.


INSERT_UPDATE Media	;...;@media[];mime[default='image/jpeg']

1.4. URL based path

For a media with the URL :

INSERT_UPDATE Media	;...;@media[];mime[default='image/jpeg']


5 2 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Newest Most Voted
Inline Feedbacks
View all comments
4 years ago

Realy great article, helped me a lot. However i would have one question: How can i import from a folder, without having to name every image in that folder? How could i just import all images from one directory, and let ImpEx take the images filename as the name for hybris? As per your article we always turn in the filename: ;…;$siteResource/hello.jpg Is there a way to emit the “/hello.jpg” part? Because, when i want to import just a lot of images, i don’t want to type in the name of every single one into the impex 🙁 I can’t… Read more »

4 years ago

Hi I uploaded the media by importing the files through backoffice but images are not reflecting in application.
Can anyone help me out regarding this?

Arshad M
Arshad M
4 years ago

Does the Impex format support an escape syntax. If some data has an embedded semicolon or a newline, how can that be escaped.

Would love your thoughts, please comment.x