Remove p tags from images

WordPress automatically wraps images in a p tag. This can create difficulties when styling text.  A useful post by vanjadjurdjevic provided the code needed to automatically wrap images in a div to avoid these problems. Just add the following to functions.php: