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 Security Assessment Engineer for Arbor Networks. Since Netscape 2.0, he has worked in a wide array of environments including non-profit, corporate, small business, and government. He started as a web developer, moved into Linux system administration, and ultimately found his place as a security professional. Having most recently conquered the OSCP certification, Will continues to hack his way into various things in an effort to make them more secure.
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