How to add external link to an image | Community
Skip to main content
amrit1993
Level 3
March 21, 2016

How to add external link to an image

  • March 21, 2016
  • 3 replies
  • 11511 views

In AEM, how to add image hyperlink to an external website. The linkto property only points to the internal pages. I read something about map, but that option is not available to me. How to enable image map or any other options please !!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Level 3
March 21, 2016

The AEM Image component supports linking to other sites. Open the dialog for the Image component and then paste in the URL of the external website into the "Link to" field. 

chirran414
Level 4
August 16, 2018

It is working for me. Just use below code snippet to the image tab and make sure you remove the "editor.html" from the URL.

Eg: external URL: https://www.facebook.com/

                    <linkURL

                                jcr:primaryType="nt:unstructured"

                                sling:resourceType="granite/ui/components/foundation/form/pathbrowser"

                                fieldLabel="Link to"

                                name="./image/linkURL"

                                rootPath="/content"/>

Thanks ,

Narayana

kautuk_sahni
Community Manager
Community Manager
March 22, 2016

Hi

As mentioned by Andy, the OOTB Image component can be hyperlinked to any external site.

Please face a look ta the image here:

 

 

The "link to" section accept the link for external site.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
kautuk_sahni
Community Manager
Community Manager
March 22, 2016

Kautuk Sahni
amrit1993
amrit1993Author
Level 3
March 22, 2016

The link to will work for the first time, but when I am trying to modify the link to another website, it is opening the previous one or the whole page is going down. I Icleared cache, restarted the server, still the same problem.

Also how to display the website to open in a new window ?

kautuk_sahni
Community Manager
Community Manager
March 22, 2016

amrit1993 wrote...

The link to will work for the first time, but when I am trying to modify the link to another website, it is opening the previous one or the whole page is going down. I Icleared cache, restarted the server, still the same problem.

Also how to display the website to open in a new window ?

 

 


Seems like some caching issue.

Please publish the page, and see is there any error coming up ?

Clear the browser cache and also look at https://docs.adobe.com/docs/en/dispatcher/page-invalidate.html

I hope this will help you.

 

Thanks and Regards

Kautuk Sahni

Kautuk Sahni