I recently started a new wordpress based site, installed v2.3.2 to start and recently upgraded to 2.3.3. I was going to write a custom plugin to do some content management things and started poking around how wordpress handles uploaded images and other files.
I needed a way to correlate uploaded images with a particular post_id. since the wp_postmeta table has a page_id field I figured it would be a breeze.
To my surprise each and every uploaded file get's assigned a unique post_id... so not only do my post and my pages get post_ids but so to all of my uploaded pictures.
I've only made 15 entries into WP between posts and pages but new posts are getting assigned ids in 50s because of all the image files I've uploaded.
It seems quite odd to me that WP would work this way. Is this how it was designed to work and if so why?
Also is there any way I can automatically associate images with the same post_id for the page they were uploaded to?