It's basically impossible to bind elementId / gfxId.
I can confirm, at least for what i know, that is impossible to make the link between the two.
And I say this because i was the one that manually made the link between an image and it's clue name.
After i've put on my site all the clues then magically Dofus Map Th site appeared. EHEH MAGIC: =)
I passed 1 image after image and i labeled it. You can image how many images there are in dofus folder ... at the time (years ago) when i did this work there were about 32k +
Edit: It's impossible to make the bind between the name of the clue and the gfxId which is the important part.
ElementId and gfxId it is possible.