WP Manifestindependent plugin directory
manifest / content / acf-image-map

Advanced Custom Fields: Image map WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

An ACF field to map shapes in image.

★ 9stars
83release downloads
≈10active sites
893composer installs
1.1.1latest · 1 year ago

Install

Download acf-image-map-1.1.1.zip From the 1.1.1 release on GitHub, Jun 6, 2025

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/androlax2/acf-image-map/releases/download/1.1.1/acf-image-map-1.1.1.zip

On Packagist as androlax2/acf-image-map:

composer require androlax2/acf-image-map
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Example

Requirements

Installation

Bedrock

Install via Composer:

$ composer require androlax2/acf-image-map

Manual

Download the release .zip and install into wp-content/plugins.

Usage

First you need to define an image that will be used to add different shapes on it.

Shapes

You can use different shapes, for now you can use polygon and points. On the front end :

  • It will return an array with your coords in an area_coords for the polygon,
  • It will return an array with the point coord in an x & y for the point.

ACF Composer

If you are using ACF Builder :

Point

$field
  ->addImage('my_image')
  ->addField('my_point_coords', 'image_map', [
    'image_field_label' => 'my_image',
    'shape' => 'point',
    'percentage' => true,
  ]);

Polygon

$field
  ->addImage('my_image')
  ->addField('my_poly_coords', 'image_map', [
    'image_field_label' => 'my_image',
    'shape' => 'poly',
  ]);

HTML

Point

For the point, you have the x and y coords.

Let's imagine that we have the fields defined above:

$field
  ->addImage('my_image')
  ->addField('my_point_coords', 'image_map', [
    'image_field_label' => 'my_image',
    'shape' => 'point',
    'percentage' => true,
  ]);

So we would have an HTML structure that would look like this to display our point on the image:

$image = get_field('my_image');
$point = get_field('my_point_coords');

<div style="position: relative;">
  <img src="<?php echo $image['url']; ?>">
  <span style="
    position: absolute; 
    top: <?php echo $point['y']; ?>; 
    left: <?php echo $point['x']; ?>"
   ></span>
</div>

Poly

You use poly to create a map on the image a priori, so here is an HTML code to achieve this:

Let's imagine that we have the fields defined above:

$field
  ->addImage('my_image')
  ->addField('my_poly_coords', 'image_map', [
    'image_field_label' => 'my_image',
    'shape' => 'poly',
  ]);

So we would have an HTML structure that would look like this to display our area on the image:

$image = get_field('my_image');
$poly = get_field('my_point_coords');

<div style="position: relative;">
  <img src="<?php echo $image['url']; ?>" usemap="#map">
  <map name="map">
    <area coords="<?php echo $poly['area_coord']; ?>" shape="poly"></area>
  </map>
</div>

Be careful, the coordinates of the area are defined in relation to the maximum size of the image. In responsive, this will not work, you have to recalculate the coordinates.

To do this automatically and easily, I recommend this package

Bug Reports

If you discover a bug in ACF Image Map, please open an issue.

Contributing

Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.

License

ACF Image Map is provided under the MIT License.

Releases

8 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
1.1.1 latest
Jun 6, 2025 1 year ago
acf-image-map-1.1.1.zip
12
Mar 15, 2025 1 year ago
acf-image-map-1.1.0.zip
10
Aug 2, 2024 2 years ago
acf-image-map-1.0.5.zip
13
Jul 9, 2024 2 years ago
acf-image-map-1.0.4.zip
8
Feb 5, 2024 2 years ago
acf-image-map-1.0.3.zip
9
Sep 6, 2021 5 years ago
acf-image-map-1.0.2.zip
15
Sep 6, 2021 5 years ago
acf-image-map-1.0.1.zip
8
Sep 6, 2021 5 years ago
acf-image-map-1.0.0.zip
8

Active-site estimate ≈10 comes from the median of recent superseded releases. Method.

A grade

Security

Advanced Custom Fields: Image map 1.0.3 · audited by WP Registry

No security issues found.

Audited release
1.0.3
Findings
none
Worst severity
—
Content hash
652e8bda47afe07c020a0be7…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.