I'm attempting to personalize the hyperlinks that wrap each image mounted on my posts. I am presently getting something similar to this:

<a href="http://www.example.com/images/uploads/2010/10/image.jpg">
    <img src="http://www.example.com/images/uploads/2010/10/image_thumb.jpg" alt="Test alt" title="image" width="630" height="541" class="alignnone size-medium wp-image-1509" />

I must have the ability to add rel and sophistication characteristics towards the link element, however i can't learn how to filter it. I am searching at functions like wordpress_get_attachment_link() or wordpress_get_attachment_url(), however i can't learn how to filter either of these.

Any ideas? Thanks ahead of time.