Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Images are not loading in publish instance

Avatar

Level 4

I have published all the content including DAM to my local publish instance but for some reason, the images are not loading in publish instance with the core image component. I see all other contents though. Also, I have noticed that src has been manipulated. I see the correct path in the data-asset="/content/dam/projectname/others/ranch.jpg" of div.cmp-image. The manipulated image src looks like this src="/language-masters/en/projectname/life/history/_jcr_content/root/container/container/container/image_825388312.coreimg.jpeg/1654535206773/ranch.jpeg"
Is there any configuration for the DAM that I am missing?

I am using Service Pack 6.5.10, archetype version 35.

Thank you!

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hello @webdev91,

 

AEM is shortening the image src path on publish environment, you can confirm that by looking at Day CQ Link checker Transformer on the OSGI configs.

 

You need to match those rule with a rewrite or a mapping, project archetype will already include them: 

https://github.com/adobe/aem-project-archetype/blob/develop/src/main/archetype/dispatcher.ams/src/co...

 

https://github.com/adobe/aem-project-archetype/blob/develop/src/main/archetype/ui.config/src/main/co...

 

 

View solution in original post

6 Replies

Avatar

Correct answer by
Level 2

Hello @webdev91,

 

AEM is shortening the image src path on publish environment, you can confirm that by looking at Day CQ Link checker Transformer on the OSGI configs.

 

You need to match those rule with a rewrite or a mapping, project archetype will already include them: 

https://github.com/adobe/aem-project-archetype/blob/develop/src/main/archetype/dispatcher.ams/src/co...

 

https://github.com/adobe/aem-project-archetype/blob/develop/src/main/archetype/ui.config/src/main/co...

 

 

Avatar

Community Advisor

@Hi @webdev91 ,

When you publish the asset on author it will be replicated to publish once the activation is complete.

Please check in the below location if the replication has been processed or queued because of any issue.

http://localhost:4502/etc/replication/agents.author.html
Did you tried below

  • Activate page along with asset?
  • Activate specific image and checked?
  • Create package of assets and publish package itself through package manager.

You can also use Tree Activation here http://localhost:4502/libs/replication/treeactivation.html to replicate all at once.

Hope that helps!


Regards,

Santosh

Avatar

Community Advisor

Hi @webdev91 ,
Please check if you are using any mapping. Please check below.
1. Any mapping under -  /etc/map.runmode(your aem runmode)
2. http://localhost:4502/system/console/configMgr -  check for 'Apache Sling Resource Resolver Factory'
    or check this in your run mode folder - org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl

You can check if your resource mapping is working at this -

http://localhost:4502/system/console/jcrresolver

Avatar

Level 4

Hi @sunil_kumar_ 

This is what I found in folder config.publish > org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.cfg.json. This came with the maven archetype only. We didn't add it.

 
{
  "resource.resolver.mapping": [
    "/content/careers/</", "/:/"
  ]
}
 

 I am not exactly sure what to check in the resource mapping resolver.

Avatar

Community Advisor

Hi @webdev91 - Your resource mapping configurations might be removing the /content from your src path.

It looks like you have been testing this on language-masters copy of the page and for this to work you also need rules to support pointing /language-masters to its respective /content/~/language-masters which is not a norm.

Can you access this directly on the live copy and confirm? If you have working resource mapping rules, accessing it on the live copy shouldn't be a problem. Let us know!

 

Thanks,

Fani

Avatar

Level 1

Still after updating the still image is not getting visible 
could someone provide the configuration