Add permission
Fix bug with open image