Image Link

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

2 Likes

Hi there, @Jamie_Ha :wave:

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

1 Like

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,

3 Likes
  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

1 Like

Hi Max,

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

Thank you,

2 Likes

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?

1 Like

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,

2 Likes

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 :slightly_smiling_face:

Hi there, @Jamie_Ha :wave:

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


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:

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 :slightly_smiling_face:

1 Like

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?

1 Like

Hi there, @Jamie_Ha :wave:

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 :slightly_smiling_face:

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,

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)

Hi Max,

Sorry the file was too big.

https://drive.google.com/file/d/1k2YD_613ERU0TIiN8hSh_hMxpX8OsjSP/view?usp=drivesdk

Thank you,

1 Like

Hi there, @Jamie_Ha :wave:

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:

Hi Max,

Just sent you a message!

Thank you and have a good weekend.

1 Like

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?

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.

2 Likes

That’s great! You’re always welcome :wink: