In my project there are three types of users, teacher, student, and admin. Each user has the provision to add posts. But my problem is that each user need each media library for add images into post. When I create a post adding space outside admin which done but the editor shows all the images inside my site. How can I create media library for each user? I am newbie in wordpress coding.
There are a number of plugins which does exactly what you intend to do. One example could be Media Categories plugin. With any of those plugins mentioned above you could have one category for each user type you have on your website.