I would like to know what is the query that is used to get the list of images from the library.
I have 'SELECT * FROM wp_posts where post_type = \'attachment\' and post_mime_type LIKE \'%image%\'', but I don't think this the appropriate query string.
Thanks