Uploaded images (images added through media upload box) can be easily wrapped in a div
by applying a filter to the image_send_to_editor
function, like this:
function wcr_wrap_image($html, $id, $caption, $title, $align, $url, $size, $alt) { return '' . $html . ''; } add_filter('image_send_to_editor', 'wcr_wrap_image', 10, 8);
The code above will generate this output: