It wasn't working properly, so, I added a few patches
Merge pull request #4 from klebervirgilio/make-it-work

Issues:

All for single select.

#1 When you click over the already selected option, the image isn't re-added.
#2 Avoid image duplication

It wasn't working properly, so, I added a few patches
Added a filter to get optgroups and options on init