base controller and blog post images controller

ready for review
see the description about id and type