AI TOOLS

Share a clickable image map as a link

A floor plan, product diagram or map with clickable regions is one HTML file. Why the hotspots land in the wrong place once the image is resized, the SVG version that stays lined up, and how to send it as a link.

4 min read·

Ask Claude or ChatGPT for a floor plan with clickable rooms, a product photo with clickable parts, or a map with clickable regions, and you usually get one HTML file: an image plus a <map> with an <area> for each region. It needs no server, so it can go out as a link.

Check the hotspots before you send it. The tests below were run in Chrome with an 800 by 400 pixel image split into a left and a right region.

The hotspots do not shrink with the image

The coords on an <area> are pixels on the image as it is drawn, and they do not scale. Most generated pages also set the image to width: 100% or max-width: 100% so it fits a phone. Tested: with the 800 pixel image shown at 400 pixels, a click on the right half of the picture opened the left region's link, and the right region could not be clicked at all, because its coords now sat past the edge of the image.

So a map that works on your laptop can send people to the wrong room on a phone or in a narrow window.

Use an SVG with a viewBox instead

An SVG scales its shapes with the drawing. Give it viewBox="0 0 800 400" (the image's own width and height), place the picture inside with an <image> element, and wrap each region's <rect>, <circle> or <polygon> in an <a href="...">. The numbers stay in image pixels, so the coords from an existing <area> can be reused.

Tested: the same two regions drawn as SVG rectangles and shown at 400 pixels wide opened the correct link on both halves.

To get this from an AI tool, ask: "Rebuild the image map as an inline SVG with a viewBox matching the image size, with each region as a shape inside a link."

Make the shapes visible on hover with CSS, such as svg a rect { fill-opacity: 0 } svg a:hover rect { fill-opacity: 0.3 }, so people can see what is clickable. A shape with fill-opacity 0 is still clickable; one with fill="none" is not (tested: the click fell through to the image). Phones have no hover, so add a short list of the regions as plain links under the image as well.

Keep the image inside the page

A path such as images/plan.png only works if that file is uploaded next to the page in the same folder. The simplest fix is to embed the image as base64 in the HTML, or upload it to the Media library and use its link: sharing a photo gallery as a link covers both and the size cost.

Upload it and send the link

Drag the HTML file onto the FileShare Pro dashboard and copy the link. Viewers need no account, and they can leave comments on the page, such as "this room is labelled wrong".

In the shared view, a region that links to another site opens in a new tab, so the map stays open behind it. This covers <a> links and image map <area> links. Links to #anchors on the same page scroll as written.

To fix a region after sending, upload the new file over the old one and the link stays the same: updating a shared link without changing it. Related: sharing an SVG file as a link and why a page that works in chat breaks when hosted.

Frequently asked

Can I keep the <map> version and just stop the image resizing?

Yes. Remove width: 100% and max-width from the image and the coords line up again. On a screen narrower than the image, people then scroll sideways to reach part of it.

Will the image map show up in Google?

No. Shared files carry a noindex header: keeping a preview out of Google.

Got a page to share?

Drop the file, copy the link — live in seconds, free plan included.

Start sharing free