user7512383
user7512383

Reputation:

Which table store address of thumbnails of wordpress post?

which table store address of thumbnails of word press post? I want to know how can access to these addresses with mysql?

Upvotes: 0

Views: 1394

Answers (3)

Jiten Gaikwad
Jiten Gaikwad

Reputation: 51

Any images added in wordpress post gets stored in wp_posts table. All the metadata related to post gets stored in wp_postmeta table.

For image it generally stores two meta_keys

  1. _wp_attached_file : Path to the image
  2. _wp_attachment_metadata : Serialize array having details about image like width, height, path, caption etc.

Note: Assuming wp_ is the table prefix you are using.

Upvotes: 1

Vijay Lathiya
Vijay Lathiya

Reputation: 1227

Images added in post store in wp_posts table with post_type attachment

all thumbnail that generated for uploaded image according registered thumb size in active theme store in wp_postmeta table in form of serialize with key '_wp_attachment_metadata'

$sql = "SELECT meta_value from wp_postmeta where post_id='your attachment id' AND meta_key='_wp_attachment_metadata'

Upvotes: 1

v-stackOverFollower
v-stackOverFollower

Reputation: 595

Post thumbnail in wordpress is stored in wp_postmeta,inside meta field you can check the post thumbnail folder & file name inside field meta_key check the _wp_attached_file.

Upvotes: 0

Related Questions