# Image Link

**URL:** <https://community.elfsight.com/t/image-link/91768>\
**Category:** General Questions\
**Tags:** google-maps\
**Created:** [December 28, 2024, 8:16pm UTC](https://community.elfsight.com/t/image-link/91768 "2024-12-28T20:16:32Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jamie\_Ha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/jamie_ha/32/46535_2.png) [@Jamie\_Ha](https://community.elfsight.com/u/Jamie_Ha)\
**Post date:** [December 28, 2024, 8:16pm UTC](https://community.elfsight.com/t/image-link/91768/1 "2024-12-28T20:16:32Z")

</div>

Can we make the image link to another page instead of having to add a website link below?

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [December 30, 2024, 4:45pm UTC](https://community.elfsight.com/t/image-link/91768/3 "2024-12-30T16:45:45Z")

</div>

Hi there, @Jamie_Ha 👋

I am afraid I didn’t quite get what you mean. Could you please elaborate on your idea?

---

<div class="post-metadata">

**Author:** ![Jamie\_Ha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/jamie_ha/32/46535_2.png) [@Jamie\_Ha](https://community.elfsight.com/u/Jamie_Ha)\
**Post date:** [December 30, 2024, 6:35pm UTC](https://community.elfsight.com/t/image-link/91768/4 "2024-12-30T18:35:36Z")

</div>

Hi Max,

So when you click on the pin it opens up the window where you can upload an image. Can the image become a link where you can link to another page?

Also, when uploading a CSV, it removes my default pin and goes to just a red pin. Can we make it so it automatically uses my default pin?

Thank you,

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [December 31, 2024, 10:46am UTC](https://community.elfsight.com/t/image-link/91768/5 "2024-12-31T10:46:31Z")

</div>

1. Just to clarify, do you want the image to be clickable, so it takes users to the right page when they click on it? Or would you like to show just the link instead of an image?

2. Right now, it’s impossible to do this, but we’ll try to consider this idea within this request - [Uploading through CSV keep existing settings](https://community.elfsight.com/t/uploading-through-csv-keep-existing-settings/91767)

---

<div class="post-metadata">

**Author:** ![Jamie\_Ha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/jamie_ha/32/46535_2.png) [@Jamie\_Ha](https://community.elfsight.com/u/Jamie_Ha)\
**Post date:** [December 31, 2024, 8:09pm UTC](https://community.elfsight.com/t/image-link/91768/6 "2024-12-31T20:09:38Z")

</div>

Hi Max,

Yes, it would be great if the image can be clickable!

Thank you,

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [January 1, 2025, 10:46am UTC](https://community.elfsight.com/t/image-link/91768/7 "2025-01-01T10:46:23Z")

</div>

Got it, thanks!

And the last questions, would you like to use the same link for all images or each image should have its own link?

---

<div class="post-metadata">

**Author:** ![Jamie\_Ha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/jamie_ha/32/46535_2.png) [@Jamie\_Ha](https://community.elfsight.com/u/Jamie_Ha)\
**Post date:** [January 2, 2025, 11:30pm UTC](https://community.elfsight.com/t/image-link/91768/8 "2025-01-02T23:30:03Z")

</div>

Hi Max,

Happy New Year!

Each image should have it’s own link please.

I am adding multiple locations to the map with images of the location and want to link directly to each individual location page.

Thank you,

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [January 3, 2025, 3:01pm UTC](https://community.elfsight.com/t/image-link/91768/9 "2025-01-03T15:01:41Z")

</div>

Thank you so much!

I’ve shared your request with the dev team. I’ll let you know if it’s feasible once I have their response 🙂

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [January 4, 2025, 3:29pm UTC](https://community.elfsight.com/t/image-link/91768/10 "2025-01-04T15:29:28Z")

</div>

Hi there, @Jamie_Ha 👋

If you’re going to open links that you’ve added to the location description, we have a solution:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/6/3/630ab3b29d3ba1f3631d85d46dcfaa58033eda39.png)

  

Just add this code to the Custom JS field on the Appearance tab of your widget’s settings and let me know how it worked:

```auto
const targetNode = document.body;
const widgetClassContainer =
	'elfsight-app-11aebde1-84bc-4599-afaa-565c46525444';

const observer = new MutationObserver((mutationsList) => {
	for (const mutation of mutationsList) {
		if (mutation.type === 'childList') {
			const appContainer = document.querySelector(`.${widgetClassContainer}`);
			if (appContainer) {
				const dialog = appContainer.querySelector('div[role="dialog"]');
				if (dialog) {
					const link = dialog.querySelector('a');
					const img = dialog.querySelector('img');

					if (link && img) {
						const href = link.getAttribute('href');

						if (href) {
							img.style.cursor = 'pointer';
							img.addEventListener('click', () => {
								window.open(href, '_blank');
							});

							// observer.disconnect();
							break;
						}
					}
				}
			}
		}
	}
});

const config = { childList: true, subtree: true };

observer.observe(targetNode, config);

```

  

In case you’d like to use another links, please send me the list of URLs and specify where you’d like to use each specific link 🙂

---

<div class="post-metadata">

**Author:** ![Jamie\_Ha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/jamie_ha/32/46535_2.png) [@Jamie\_Ha](https://community.elfsight.com/u/Jamie_Ha)\
**Post date:** [March 5, 2025, 12:19am UTC](https://community.elfsight.com/t/image-link/91768/11 "2025-03-05T00:19:11Z")

</div>

Hi Max,

Thanks for providing the JS. I added it into the appearance tab and saved it.

I uploaded a photo to the location Rhodes by Listraor & Locarno but the photo and title are not linking. Would you be able to assist?

All of the locations are going to be a different link so what would be the most efficient way to do it?

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [March 5, 2025, 10:38am UTC](https://community.elfsight.com/t/image-link/91768/12 "2025-03-05T10:38:40Z")

</div>

Hi there, @Jamie_Ha 👋

The thing is that the JS codes don’t work in the configurator and preview mode, but if you check the widget on your website, the code will work.

Please test it out on your website and let me know how it worked 🙂

---

<div class="post-metadata">

**Author:** ![Jamie\_Ha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/jamie_ha/32/46535_2.png) [@Jamie\_Ha](https://community.elfsight.com/u/Jamie_Ha)\
**Post date:** [March 5, 2025, 7:19pm UTC](https://community.elfsight.com/t/image-link/91768/13 "2025-03-05T19:19:12Z")

</div>

Hi Max,

Okay that worked but when I click on it, it opens the page in a new tab. The first time it opened it 4 times and the second time it opened it up 7 times. How do we fix that?

Thank you,

---

<div class="post-metadata">

**Author:** ![Jamie\_Ha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/jamie_ha/32/46535_2.png) [@Jamie\_Ha](https://community.elfsight.com/u/Jamie_Ha)\
**Post date:** [March 5, 2025, 7:22pm UTC](https://community.elfsight.com/t/image-link/91768/14 "2025-03-05T19:22:28Z")

</div>

Hi Max,

Please see the video attached.

If you look at the bottom right corner, it’ll show I have 9 tabs open before I click it and then 19 after. Every time I have clicked the photo, the number of pages it opens up increases.

Thank you,

(Attachment ScreenRecording\_03-05-2025 11-19-40\_1.mp4 is missing)

---

<div class="post-metadata">

**Author:** ![Jamie\_Ha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/jamie_ha/32/46535_2.png) [@Jamie\_Ha](https://community.elfsight.com/u/Jamie_Ha)\
**Post date:** [March 5, 2025, 7:26pm UTC](https://community.elfsight.com/t/image-link/91768/15 "2025-03-05T19:26:52Z")

</div>

Hi Max,

Sorry the file was too big.

[https://drive.google.com/file/d/1k2YD\_613ERU0TIiN8hSh\_hMxpX8OsjSP/view?usp=drivesdk](https://drive.google.com/file/d/1k2YD_613ERU0TIiN8hSh_hMxpX8OsjSP/view?usp=drivesdk)

Thank you,

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [March 6, 2025, 10:40am UTC](https://community.elfsight.com/t/image-link/91768/16 "2025-03-06T10:40:49Z")

</div>

Hi there, @Jamie_Ha 👋

Your website is password protected at the moment. Could you please send me a password in a direct message?

For this, just click on my profile image and choose Message:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/6/c/6ca275d920d583dc5552c5e5427008aeb1279f10.png)

---

<div class="post-metadata">

**Author:** ![Jamie\_Ha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/jamie_ha/32/46535_2.png) [@Jamie\_Ha](https://community.elfsight.com/u/Jamie_Ha)\
**Post date:** [March 8, 2025, 2:45am UTC](https://community.elfsight.com/t/image-link/91768/17 "2025-03-08T02:45:51Z")

</div>

Hi Max,

Just sent you a message!

Thank you and have a good weekend.

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [March 10, 2025, 10:45am UTC](https://community.elfsight.com/t/image-link/91768/18 "2025-03-10T10:45:52Z")

</div>

Thank you!

I’ve checked your website on desktop and mobile and there was no issue with multiple tabs opened right away. Does the issue occur on desktop too, or on mobile only?

If only on mobile, please specify the device you’re using and the browser version.

Regarding the link opening, you’d like it to be opened in the same tab, am I right?

---

<div class="post-metadata">

**Author:** ![Jamie\_Ha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/jamie_ha/32/46535_2.png) [@Jamie\_Ha](https://community.elfsight.com/u/Jamie_Ha)\
**Post date:** [March 10, 2025, 11:27pm UTC](https://community.elfsight.com/t/image-link/91768/19 "2025-03-10T23:27:13Z")

</div>

Hi Max,

Oh that is odd! I just tried it now on both desktop and mobile and it’s working properly. I do want it to open in a new tab so that is perfect.

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [March 11, 2025, 10:07am UTC](https://community.elfsight.com/t/image-link/91768/20 "2025-03-11T10:07:58Z")

</div>

That’s great! You’re always welcome 😉
