Apply a tag to every images ‘Link Rel’

You can create a content_filter that will update on the fly meaning that you don’t have to update all previous pictures and it will be the default so you don’t have to worry about your authors. something like this:

function autoadd_rel_prettyPhoto($content) {
    global $post;
    $pattern        = "/(<a(?![^>]*?rel=['\"]prettyPhoto.*)[^>]*?href=['\"][^'\"]+?\.(?:bmp|gif|jpg|jpeg|png)['\"][^\>]*)>/i";
    $replacement="$1 rel="prettyPhoto[".$post->ID.']">';
    $content = preg_replace($pattern, $replacement, $content);
    return $content;
}

add_filter("the_content","autoadd_rel_prettyPhoto");