Skip to Content
Technical Articles
Author's profile photo Vinod Singh

CCv2 Image Processing


Media Conversion is an important step as part of the CCv2 checklist. This blog explains the various image processing options for solution architects and developers who want to migrate to CCv2. With Cloud Automation from SAP, an image conversion service is available in the SAP Commerce cloud.

Let’s look into the various options for image processing.


Most of us have already used ImageMagick with SAP Commerce (hybris) project. Let’s see how CCv1 or standard on-Prem projects have used ImageMagick.


CCv1/On-Prem Solution:


  • Images are picked up from the file system and processed by Custom Media Import jobs such as ProductMediaImportJobs.
  • Once MediaConversionService is invoked, ImageMagickConversionStrategy component is used to convert the actual image using the local ImageMagick installation.

After migrating to CCv2, you would still want to use ImageMagick. So let’s see what possible changes we might need:

  • Use Azue CloudBlob storage instead of File Objects
  • Use cloudmediaconversion extension
  • Update manifest.json file to use image processing service (enableImageProcessingService)


CCv2 Solution:

  • Read the image files from Azure Blob Storage using CloudBlob objects
  • MediaConversionService is used to call conversion Strategy called RemoteImageMagickMediaStrategy (cloudmediaconversion extension)
  • RemoteImageMagickMediaStrategy call the image conversion web service
  • WebService Calls the ImageMagick commands to convert the images automatically when the configuration property (enableImageProcessingService) on CCv2 is shown below in manifest.json. 

Helpful Links:

Java 2D

This was the solution used when CCv2 was introduced and ImageMagick was not supported by SAP.

I will not go into details about this implementation since SAP recommends using ImageMagick as its OOTB in CCv2 now, however, it is good to know that mediacontrib extension was built using Java Image scaling library – “imgscalr-lib-4.2.jar” .

DAM Integration

This solution can reduce a lot of manual tasks of image conversion logic. There are different ways that one could integrate with the DAM (Digital Asset Management) system to receive the right Asset URLs. Most of the DAM systems can be integrated using simple REST API calls.

  • Get the Asset ID using PIM (product information management) integration
  • Once you have the URLs from the DAM system, you need to do the following
    • create media Model for each asset
    • create  mediaContainer Model
    • attach the mediaContainer to Product
  • Solr update
    • Update SolrIndexedProperty with the right value provider bean name of type abstractImageValueProvider to index on PLP and SRP Pages


[SOLVED]: Issues

That’s all for now on Image Processing on SAP Commerce.

Hope this has helped you to speed up your CCv2 migration. Stay tuned for more solutions. 🙂

If you have any feedback or suggestions, please feel free to add a comment below.



Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Phani kumar Bhavirisetty
      Phani kumar Bhavirisetty

      Hi Vinod,

      Great article. I have a couple of questions,

      1. Where can I get cloudmediaconversion and mediaconversionbackoffice extensions, so that we can take a look at source code?
      2. If I want to customize it let's say I want to read the original image file from any custom location(eg: S3) and convert using image magick and store the converted files in any custom location(eg: S3), is that possible? If yes what's the customization approach?
      3. is CCV2 image magick require an additional license?


      Author's profile photo Patrick Gäckle
      Patrick Gäckle



      the mediaconversion and mediaconversionbackoffice can easily be added to the localextension.xml by adding

      <!-- Media Conversion -->
      <extension name="mediaconversion"/>
      <extension name="mediaconversionbackoffice"/>

      Afterwards run ant build and start the server. Then via HAC run an update for those extensions.

      Regarding the cloudmediaconversion it seems you cannot get any source for that locally, which is also my issue right now as I have to deal with developing against it. For now I stick to the mediaconversion extension locally and hopefully find a way later to include the cloud extension into my manifest without having building issues locally.