WordPress Image Map Problems

I had many issues trying to get a good old-fashioned HTML image map to work in a WordPress page or post. It seemed that WordPress kept trying to add extra <map> tags around all my <area> tags. I couldn’t get it to stop!

After being led astray by such issues as wpautop() and the need to use various plugins, I finally figured out how to embed HTML image maps on my pages.

The trick is that you can’t use pretty, nicely formatted HTML because WordPress tries to automatically close tags and do various other things to your code when it detects new lines.

So instead of something nice like this:

You actually need to remove all the extra spacing and use something messy like this:

About Will Chatham

Will Chatham is the Application Security Engineer at a cyber security research and development firm. Since Netscape 2.0, he has worked in a wide array of environments including non-profit, corporate, small business, and government. His varied background, from web developer to search engine optimizer to security professional, has helped him build a wide range of skills that help those with whom he works and teaches.
Bookmark the permalink.


  1. Hi there!
    do you have any experience with adding an image map in the id wrapper?

  2. Hi Ann, what ID wrapper are you referring to exactly?

Leave a Reply