Thank you very much for your help =)
I tested it and that is what happens:
When we upload an image through add-from-server tab, the new image is attached to the page and the image appears on gallery tab.
Looking at the new attachment entry on wp_posts table I noticed that post_parent field was setted to the page's id I am editing. But I still can't access the image through pagename/imagename permalink.
Whether I insert this new image on page I can access the image through pagename/imagename.
So what I find is:
A new wp_post entry isn't enough to create a new attachment, and the page_parent field value isn't enought to WP find the image through the post permalink.
So, what else happens when an image is attached to a post?
- upload file to server
- new post entry where post_type is 'attachment' and post_parent is page's id which we are editing
- ? (what else?)
I still looking for a way to create a permalink to access my images. Any help is very appreciated. =)