Surround uploaded image link with div

You can use a image_send_to_editor filter hook to achieve what you want.

<?php
    add_filter( 'image_send_to_editor', 'imagehtmlchange', 10, 8);
    function imagehtmlchange($html, $id, $caption, $title, $align, $url, $size, $alt) {
        // your banny wrote - put your code here
        return $html;
    }
?>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)