How do I show all the images in my public:/images/ folder? So i have successfully uploaded my images into my public:/images folder now i want to output/display all of them in page how do i retrieve all the images?

here's  code by the way of handling the form.

 function testform($form, &amp;$form_state) {
   $form = array();
   $form['file'] = array(
      '#type' =&gt; 'file',
      '#title' =&gt; t('Image'),
      '#description' =&gt; t('Upload a file, allowed extensions: jpg, jpeg, png, gif'),
     );
  $form['submit'] = array(
      '#type' =&gt; 'submit',
      '#value' =&gt; t('Submit'),
     );
 return $form;


}

here's the code for validating it. 

      function testform_validate($form, &amp;$form_state) {
         $file = file_save_upload('file', array(
        'file_validate_is_image' =&gt; array(),
        'file_validate_extensions' =&gt; array('png gif jpg jpeg'),
          ));
       if ($file) {
       if ($file = file_move($file, 'public://')) {
       $form_state['values']['file'] = $file;
    }
else {
        form_set_error('file', t('Failed to write the uploaded file the site\'s file   folder.'));
     }
  }
else {
   form_set_error('file', t('No file was uploaded.'));
}


}

here's the code for submitting.

    testform_submit($form, &amp;$form_state) {
         $file=$form_state['values']['file'];
         unset($form_state['values']['file']);
         $file-&gt;status = FILE_STATUS_PERMANENT;
         file_save($file);
         drupal_set_message(t('The form has been submitted and the image has been saved,   filename: @filename.', array('@filename' =&gt; $file-&gt;filename)));
          }
Firstly get fid of the images and then put it in the function below Like i did:-

$file_load=file_load($fid);  
$url=$file_load-&gt;uri;


$url retrieve you image path where you have uploaded your image.
Like:- public:/images/image_name

Use this fuction to display your image. image_style

$variables= array(
'style_name' =&gt; 'style_name', 
'path' =&gt; $url, 
'getsize' =&gt; FALSE, 
'attributes' =&gt; array(
 'width' =&gt; '100',
 'height' =&gt; '100')
);

echo theme('image_style',$variables);


Note :-if you are using drupal theme('image_style',$variables) function to display image.then put url like public:/images/image_name in path given above.else you are using  to display image then use below code.

Or You can also do this.

$file_url=file_create_url($url); 
echo '&lt;img src="'.$file_url.'"'&gt;;


Hope this will help you.