A site plan with numbered pins. A pin opens a panel with a title, text and a link, then the image is zoomed in and dragged.
The media form: a click on the image adds a hotspot, its title is typed in the fields below, and the pin is dragged to a new spot.
The fields of one hotspot: title, text, link, link text, variant and exact position.
A site plan with six numbered pins. The panel of pin 1 is open, showing a title, a short text and a link.

This project is not covered by Drupal’s security advisory policy.

Reusable images with interactive hotspots, as a media type. Upload an image once, place pins on it with a title, text and an optional link, and reuse it anywhere media can go.

Features

  • A "Hotspot image" media type. One hotspot image works in media reference fields, CKEditor 5, Gutenberg, Layout Builder and Paragraphs.
  • A visual editor in the media form: click the image to add a hotspot, drag it or use the arrow keys to move it.
  • Visitors open a pin to read its text. They can zoom in, drag the image and show it full screen.
  • Variants, for maps with more than one kind of pin, such as venues and bus stops. Your theme decides what each one looks like.
  • Images the core way: image styles, responsive image styles, and a larger image that loads only when a visitor zooms in.
  • Accessible: pins are buttons named by their title, panels use the native popover attribute, everything works by keyboard, and a list formatter gives a text alternative.
  • A neutral look that is easy to replace: CSS custom properties, look files you can switch off, and a template you can override per media type and view mode.
  • No build step and no front-end dependencies beyond Drupal core.

Use it for site plans, maps, floor plans, product images and diagrams where parts of an image need an explanation.

Post-Installation

Installing the module creates the media type "Hotspot image". No further setup is needed.

  1. Go to Content, Media, Add media, Hotspot image.
  2. Upload an image and click it to add hotspots. Give each one a title.
  3. Save, then use the media where you want it: allow the "Hotspot image" media type in a media reference field or in "Embed media" in a text format.

With Block Content or Paragraphs and Media Library enabled, a "Hotspot image" block type and paragraph type are created as well.

Zoom, full screen and image styles are settings of the "Image with hotspots" formatter, under Structure, Media types, Hotspot image, Manage display.

Additional Requirements

Drupal 11.3 or later, with the core Media, Image and Filter modules. Nothing else is required.

Visitors need a browser with the popover attribute, which all current browsers have had since 2024.

  • Media Library (core), for picking hotspot images in blocks and paragraphs.
  • Paragraphs, for the "Hotspot image" paragraph type.
  • Gutenberg, where hotspot images go in with the "Media" block.
  • Responsive Image (core), to serve a size that fits the screen.

Similar projects

Media Hotspots stores each hotspot as a field value on a media entity, so hotspots are validated, translated and revisioned like any other field, and one image is reused across the site. Modules that attach hotspots to a single field or paragraph keep them where they were made.

Supporting this Module

Bug reports and feature requests are welcome in the issue queue.

Community Documentation

The README covers use. The docs folder in the repository covers theming, architecture and development.

Supporting organizations: 
Development and maintenance

Project information

Releases