![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqWORhh21NC3z-X2r6JQ6GTPLEjMHrmYJGcyzK_nclZ6BbkTswchfECoQYr38_4Jvalm-AZ3hifojBJbRXbl2AcZcTEjJhENSCIAcVRnNGHhUEfmN5ZSjV3UKolu3vDaICcYswYnF49gc/s1600/Wordpress+database+page+and+post+problem.png)
There are things I simply dislike about WP. Why would WP create a single page for each image you upload to the media library, by default? These pages are called 'attachment pages' and mean that each single image you upload, no matter if used in a post or page or not, will create a page by default that has this image embedded. For the vast majority of users, I dare to say these pages are complete nonsense to have.
So for instance, you create a post with the following URL:
http://your1domain.com/2014/08/my-bestever-post
You are using an image (greatpic.jpg) in the post.
That's the standard path to the image location:
http://your1domain.com/wp-content/uploads/2014/08/greatpic.jpg
But WP will create an additional page (the so called 'attachment page') for this image, like this:
http://your1domain.com/2014/08/my-bestever-post/greatpic/ (the post name, with an added trailing slash followed by the name of the picture without .jpg, or click 'View' next to each image inside the media library to see these pages)
Now, I understand that (at least as of WP 3.9) you can select where the embedded image links to (image itself, any link, image attachment page, or none).
Also, I understand that you can suppress the crawling and indexing of these unwanted pages (via some code or plugins), but my point is: Why the heck does WP need to create those pages in the first place, i.e. why not simply have an image library without this 'attachment' practice?
They say that some photographers want these attachment pages...but I'm saying there are better ways to present images than on default pages that are thereby generated for every user, whether or not they want or need them!
Thoughts?
In a database-driven website, those pages don't actually exist unless a browser requests them. They're not taking up space, using resources, or otherwise diminishing the visitor's experience.
They don't exist as static pages. I'm actually not sure why a search engine would crawl links to categories and tags and attachments, but they do. I haven't had enough tea yet but I can track down a more complete technical answer if you like, once I'm more alert.
When you upload an image, you choose what it links to: the image, an attachment page, some custom link, or nothing at all.
If you link to the image, it's not a page, as such. Google shouldn't see it any differently than if it indexed the folder full of images (which it can, and will, unless you take steps to prevent it, which I don't.)
If you link offsite, for instance, to give photo credits, that's just another link.
Google can't invent pages for data-driven websites. It simply follows any links which do exist, dynamically creating the page on the fly (which is the whole point of database-driven websites: one or toe templates, filled in with oodles of data, to create potentially thousands of unique pages using minimal resources, both for coding and browsing.)
Don't create those links when you add an image to a post, and Google won't have a link to follow.
Your posts and pages aren't real pages, either, so you're right in comparing the attachment pages to them.
Your WordPress site has zero pages in the manner you think of website pages. None.
It has templates, which are populated with data from the database.
Until a browser *requests that URL* the page does not exist. It cannot, it's just a template, entirely devoid of data.
It is a glass, without a drink, because the drinks are still in the fridge. Until you put something IN the glass, it is not a DRINK. In fact, what's in the fridge isn't a drink either, unless you drink out of the carton, in which case, shame on you
The reason WordPress does this, to answer one of your original questions, is because it was, first, long ago, only a blog tool, not a website tool. There are still some of those artifacts hanging on.
And, in fact, the opposite of your perspective is also completely valid: why would WordPress default to just shoving your image into the browser, without including your header, navigation menus, footer, sidebars, etc.? Why do you want to actively strip away your website any time someone views one of the images you use?
Useful to you, perhaps, but to many folks, exactly the OPPOSITE of desired behavior.
Another note on database drive pages being indexed. Here's why *it's not possible* unless there is a link, and actual URL.
The data is stored in your database. Google does not have access to your database. No, it doesn't. It has access to your website, which has permission to access the database.
On its own, Google can't see your database. Can't. Not possible, unless someone has broken something.
Let's pretend for a moment that it COULD see your database.
WordPress has a search tool, right? So do lots of sites.
Image Google indexing *every possible set of search results* from a complex database like Zappo's. Millions, perhaps billions, of pages. Google would have to dedicate an entire wing in their mansion to indexing Zappos. And another for Amazon. And another for every large database drive site.
Google can't see into your database. It can only follow links.