uploaded files are stored as attachment post type in WordPress. Use get_posts() and query for all attachments:
$args = array(
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => null,
'post_parent' => null );
$all_attachments = get_posts( $args );
EDIT – you can also set post_mime_type
in get_posts to get all of type ‘image/jpeg’ for example.
Related Posts:
- What plugin can I use to create a list / slideshow of featured images?
- Add jQuery to WordPress page
- Deleting images through upload folder, but not deleting from media library
- jQuery function didn’t work in my plugin
- how to include a simple jquery file into a wordpress plugin
- Pass a php string to a javascript variable
- Notepad sticky plugin
- Adding a slider captcha to the comment system
- How to put JQuery/Ajax inside shortcode?
- Error with Image Slide plug-in/ s3slider in WP
- wordpress site | All-in-one-cufon IE Issue
- WordPress function not being called from jQuery method
- How to prevent plugins from loading jQuery
- Using color picker in plugin, does input attribute order matter?
- Using window.onload with Ubermenu
- Media Upload Tab reload and change $_GET
- Redirect to another page using contact form 7? [closed]
- How to include this jQuery File in wordpress?
- wordpress add_action() issue in ajax call
- Adding media upload button to User Profile page (following a tutorial)
- JQuery prepend a function
- Plugin not working & permalink erorr after upgrade to php 7x on Nginx
- Save user total active time after login in wordpress [closed]
- Programatically upload a file to be stored inside blob field in database, NOT on filesystem
- Api external with wordpress
- File Uploader – Upload without adding to Media Library
- Custom meta box with jQuery.sortable custom post type list
- Portfolio Slideshow Sliders Behaving Oddly When in jQuery Ui Tabs
- WordPress slider that allows image, headline, text, and button?
- How do I reinit WordPress plugins dynamically using jS?
- WordPress jQuery Post – Amending Variable Value Within Function Command
- WP Ajax DB issues
- How to get a specific string from a url
- the content of the uploads folder gets deleted periodically, how to figure out what causes it?
- update_post_meta is not working for me when I use e.preventDefault for update button
- 500 Internal server error wp_handle_upload_prefilter
- Move plugin upload folder from mywebsite.com/wp-content/uploads/pdfuploads to mywebsite.com/pdfs?
- Flexslider empty slide
- Soflyy WP All Import Custom File Download Issue
- Help with customising love it plugin (use within foreach)
- How to install jquery dotdotdot plugin for WordPress?
- How to create a dashboard for logged-in users with custom functionality? [closed]
- AJAX doesn’t pass variables to the php function in the plugin
- What is the process for reimplementing a back up WordPress?
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- PHP and Jquery pass value from form. Update function on DataBase
- Plugin use of ajax/jquery depending dropdown
- How do I output user_registered time in my correct timezone?
- wordpress jquery is not defined because the head tag is empty
- How to rename files during upload to a random string?
- wp_handle_upload – specified file failed upload test
- I want to allow certain file types on dokan upload files
- stop resize button for wordpress media
- Woocommerce attatch files and custom input meta to cart items and then to order
- Custom uploader – Upload files and save link into database
- Custom plugin translation not working
- How to add pagination to wpbakery grid?
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- send_headers don’t work on wordpress multisite
- How can I process xml file on upload?
- Admin page: form with enctype=”multipart/form-data” does not transfer its data
- Add multiple attributes to product from php
- Reuse javascripts from plugins within the theme
- Cannot run the code after I activate the plugin
- Adding a jquery script to plugin contact form 7
- Displaying admin notice dynamically
- How to import 55k images (uploaded via FTP) into WordPress Media libary? [closed]
- Can I check plugins and themes for PHP 5.6 ahead of global PHP server Update
- bulk change of image setting “link to” to “link to: image url “
- AJAX image upload with a upload progress bar using media_handle_upload
- Displaying Gravity Form data on WordPress page [closed]
- Is it possible to personalize the Media Library?
- Changing image URLs in media library
- WordPress 3.5 Media Manager – add a button
- jQuery Plugin to use WordPress functions in AJAX request
- Handling jQuery Component Collision
- Improving a Stackoverflow “inspired” badge system to display badges in author page
- Get a list of galleries from an album in NextGEN Gallery [closed]
- How do I make sure a plugin loads a script after jQuery
- Bulk Image Uploader to create new post from each image [closed]
- How to install and activate a plugin via an external PHP script
- Calling a plugin in theme development
- Display a text message if the field is not found and not if found
- Unable to activate wordpress importer after installing it
- Reposition Woocommerce Message
- Upload file inside plugins options page
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- Get total number of comment of the posts written by an author
- Add get_option to jquery
- How do you remove plugin edit option?
- Escape when echoed
- Scope for PHP Variables Assigned in functions.php or a plugin
- add_meta_box (Will display only in specific page admin WordPress)
- Make specific products accessible only to a user role in WooCommerce
- force customers to add only single item to card per purchase EDD [closed]
- Undefined property: WP_Post_Type::$ID
- Plugin exceeds memory limit
- How to get post URL in the_content filter?
- How to remove xmlns on language_attributes()?