Search code examples
aemaem-6

AEM Transform not working -Content dam asset transform is not transforming image dynamically


I have an asset(.jpg) stored in content/dam .. I am trying to dynamically transform that image by using named image transform factory(i.e 3D150 which resize it to some x width and height)

Example : My asset location /content/dam/asset/xyz.jpg So if i use something like this /content/dam/asset/xyz.jpg.transform/3D150/123.jpg i am expecting 123.jpg to be rendered in the resize mentioned in named image transform factory. I tried to debug it i do see that it does hit this servlet com.adobe.acs.commons.images.impl.NamedTransformImageServlet. But it finally gives me a page not found error


Solution

  • one hint before I start: Giving AEM version and ACS Commons version might help... I hope you have ACS commons installed..?

    It looks like you did the naming wrong. The documentation says you need to add the following things to your supported resource URI:

    1. .transform suffix (you did that correctly)
    2. name of your transform config - needs to be set in OSGi config (MISSING)
    3. /img or /image (MISSING)
    4. .{YOUR_IMAGE_EXTENSION} (correct)

    So that would then lead to a URL like /content/dam/asset/xyz.jpg.transform/123/img.jpg If your config is stored as /123.

    Please see https://adobe-consulting-services.github.io/acs-aem-commons/features/named-image-transform/index.html for a detailed documentation.