Create a Clickable Image Map in SharePoint Online

Requirement: Create an image map in SharePoint Online modern page.

How to create an image map SharePoint Online?

An image map is a graphical way of dividing a single image into multiple sections, each with its own hyperlink. By creating an image map in SharePoint, you can add hyperlinks to specific regions of an image. This can be useful for creating navigation menus, showing relationships between different parts of an image, or just for providing links to different areas of your site. If you have ever tried to create an image map in SharePoint Online, you know that it can be a bit tricky. To create an image map in SharePoint Online, follow these steps:

  1. Create an Image Map
  2. Upload the Image and ASPX file to SharePoint Online
  3. Insert the image map to the SharePoint page using the Embed web part

Step 1: Create an Image map

You can create an image map using an image editor like Adobe Photoshop or SharePoint Designer. You can also use Online tools like Insert an image, and you can add hotspots by drawing lines around a specific portion of the image, and then You can define the target URL for each hotspot. Make sure to leave enough space between each section so that users will be able to click on the individual areas without accidentally clicking on another one as well. Once you’re happy with your grid, save the generated code as ImageMap.ASPX (or any file.ASPX).

image map sharepoint online

Step 2: Upload the Image and ASPX file to SharePoint

Once you are ready with the image map code, upload the image you used for the image map, and update the code you copied in the previous step with the image reference from SharePoint. And then upload the aspx file to any of your SharePoint Online libraries like “Site Assets”.

sharepoint online image map modern page
You must enable custom script before uploading the ASPX file! If you enabled the custom script flag for the site lately, You have to re-upload the file again. How to Enable Custom Script in SharePoint Online?⁣. Otherwise, you’ll end up in a “File Not Found” error.

Step 3: Insert the Image map to SharePoint Online Modern Page

Finally, we have to add the image map to a SharePoint Online page using the Embed web part.

  1. Navigate to the SharePoint Online page where you want to add an image map. Click on “Edit” and insert the “Embed” web part on the relevant portion of the page.
  2. Edit the web part and set the embed code to the URL of the ASPX page you have uploaded, ImageMap.aspx in our case. create image map sharepoint online
  3. Save and publish the page.

Here is the visually appealing SharePoint Image map in action:

sharepoint online clickable image map

In Classic sites and SharePoint On-premises, you can use the script editor web part to add an image map: How to Create Image Maps with SharePoint Designer?

How to add HTML code in SharePoint Online Modern page?

Place your HTML code in a file and save it as FileName.ASPX, and then you can use the Embed web part to display its contents. Alternatively, you can use the Modern script editor web part to add HTML/JavaScript/CSS code to your modern Sharepoint Online pages.

How to enable SharePoint designer in SharePoint Online?

To enable SharePoint Designer, activate the custom script for the SharePoint Online site collection.
More info: Connect SharePoint designer to SharePoint Online

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

Your email address will not be published. Required fields are marked *