I am developing a plugin. This plugin creates a folder in wordpress uploads folder to store image files. Though the image file is getting stored in wp-content/uploads/my-plugin-folder/59a804d376a83.jpg like this it does not display in the pages. I store image url in database and retrieve it page in url like http://mywebsite/wp-content/uploads/my-plugin-folder/59a804d376a83.jpg. Its working on local wamp server but not on live website. I changed the permission of my-plugin-folder to 745 (Read permission). If i past the image url I get 404 page not found error on wordpress website.
For the permission please read this
All directories should be 755 or 750.
I fixed this by changing the permission of uploads folder to 745 and its working.