image rollover in wordpress, no plugins required

I’m seeing quite a bit of traffic to this post. I suppose I should explain that this was a quick hack to see if I could get image rollover to work on a friend’s hosted blog (and no, I couldn’t). This little example doesn’t do preloading, either, and I really don’t have any intention to develop this further. Sorry …

<img title="this" onmouseover="this.src='';" onmouseout="this.src='';" src="" alt="" width="192" height="116" />

This does not work on hosted blogs; it gets stripped out.

Update: You probably want to install the plugin Ultimate TinyMCE, which does the job rather well.


  1. @Yoli:
    after placing rollover image with this code, select it and click link button from tool bar.
    Its that simple and it works for me.
    btw , thanks for this code

  2. Thanks man i was also figuring out that finally gotcha.
    If you permit A want to same post on my WordPress.

Leave a comment

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