Get all images in uploads directory and list them July 14, 2022 by Tarik Billa $upload_dir['baseurl'] should be $upload_dir['basedir']. You want the server path, not the URL of the directory.