WordPress.org

Ready to get started?Download WordPress

Forums

Do someone know how to fetch post images sizes via MYSQL Query? (2 posts)

  1. mdkhan
    Member
    Posted 1 year ago #

    i am developing a web-services using PHP with adodb classes. what i trying to do is that i need the image sizes of the post i.e(thumbnail, medium, large) size. I am able to fetch the post original image link URL from the database. But i need that post image different sizes from the database.

    Does any one know where post images sized are stored in the database?

    MySQL query for fetching the post images is below:

    SELECT files.meta_value AS filepath FROM wp_posts posts INNER JOIN wp_posts attachments ON posts.ID = attachments.post_parent INNER JOIN wp_postmeta files ON attachments.ID = files.post_id WHERE files.meta_key = '_wp_attached_file' AND posts.ID =$post_id

  2. keesiemeijer
    moderator
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic