I know we can import images which are not zipped like this
$siteResource=jar:com.project.initialdata.constants.ProjectInitialDataConstants&/projectinitialdata/import/sampledata/images/brand
INSERT_UPDATE Media ; code[unique=true] ; mediaFormat(qualifier) ; realfilename ; @media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator] ; mime[default='image/jpeg'] ; catalogVersion(catalog(id),version)[unique=true,allownull=true]
; logo-molinard.jpg ; ; Molinard_logo.jpg ; $siteResource/8918352691230.jpg ; image/jpeg ; hybrisContentCatalog:Staged
; Logo_LittleMarcel ; ; LM_logo.jpg ; $siteResource/8918375858206.jpg ; image/jpeg ; hybrisContentCatalog:Staged
But in my case I need to import the images which are in a zip file.
Update:
It works when I do like this:
$siteResource=zip:C:\HYBRIS_SERVER\hybris\bin\custom\project\projectinitialdata\resources\projectinitialdata\import\sampledata\images\brand
INSERT_UPDATE Media ; code[unique=true] ; mediaFormat(qualifier) ; realfilename ; @media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator] ; mime[default='image/jpeg'] ; catalogVersion(catalog(id),version)[unique=true,allownull=true]
; logo-molinard.jpg ; ; Molinard_logo.jpg ; $siteResource/images.zip&8918352691230.jpg ; image/jpeg ; hybrisContentCatalog:Staged
Note above I'm giving an abolute path.
But when I tried to give relative path like this it didn't work
$siteResource=zip:com.project.initialdata.constants.ProjectInitialDataConstants&/projectinitialdata/import/sampledata/images/brand
INSERT_UPDATE Media ; code[unique=true] ; mediaFormat(qualifier) ; realfilename ; @media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator] ; mime[default='image/jpeg'] ; catalogVersion(catalog(id),version)[unique=true,allownull=true]
; logo-molinard.jpg ; ; Molinard_logo.jpg ; $siteResource/images.zip&8918352691230.jpg ; image/jpeg ; hybrisContentCatalog:Staged