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
- Generate custom output for page/URL in a plugin
- WordPress widget / plugin….fields not appearing in my widget
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Multi step form, custom plugin
- How to send “Location” header on plugin form submit event?
- How do I use WordPress PHP functions in my Javascript code?
- What’s the point of using WordPress’s built in admin-ajax.php?
- Extending WP’s upload/insert media functionality
- From where come that JS files in ?
- Can I check plugins and themes for PHP 5.6 ahead of global PHP server Update
- Improving a Stackoverflow “inspired” badge system to display badges in author page
- Missing argument 3 for wp_register_sidebar_widget()
- How to Include a Loop Template File in a Plugin
- Find unused images?
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- Storing Options in a Shortcode
- How can I get WordPress to save comments in markdown format?
- Shortcode button dosent work for all posts. Work for first post only
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Add Product Subtitle to Woocommerce Product Page
- Display data on Word Press site posts and pages from mysql table
- How make a php script run only with wp-cron
- Redirection of users away from wp-admin (but not administrators)
- Most efficient way to use classes to create admin pages using Settings API
- CMB2 toolkit: Compare 2 Dates and validate the Time
- PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback Error without any function name
- Custom WPBakery elements not displaying in WP admin
- Adapt PHP form action for WordPress?
- All sites themes functions.php have been changed
- Individual testimonial taxonomy not displaying (white screen)
- Adding regex filter to feedwordpress
- Using TinyMCE in plugin?
- how to get the url of a custom uploaded file
- cURL External API request displays content above other content on page
- A way to upload old html pages with all its assets via WordPress admin and to add a fixed menu on top of those (a la Wayback Machine)
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Posts in Admin only display 1 Post instead of all Post in admin area
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Creating a Table Row by Row
- Getting 504 Gateway Timeout Error on AWS Server! [closed]
- WordPress issue – data is not showing in wp-admin, but when searching through database, all the data is there
- WordPress Throwing Deprecated Errors on its own Files
- plugin doesn’t retrieve data from database
- Getting table to format properly in RSS feed emails
- Getting table to format properly in RSS feed emails