I made a simple example. It will return all visible files (hides files starting with .), including folders. If you want to confirm that the file in fact is an image before doing anything with the result, then you will have to modify it yourself, or let me know.
// Turn on error reporting
ini_set( 'display_errors', 'yes' );
// Set path to our directory (for easier use)
// Remember the last slash (/)!
$directory_path = 'your/image/folder/';
// Open the directory
$directory = opendir( $directory_path );
// Read the directory content
while( ( $file = readdir( $directory ) ) !== false )
// Drop hidden files and files which names begins with a dot
if( substr( $file, 0, 1 ) != '.' )
// Put data in variables
$filename = $file;
$filesize = filesize( $directory_path . $file );