$fs = get_file_storage();
$files = $fs->get_area_files(/* Insert file area details here */);
foreach ($files as $file) {
$imgurl = moodle_url::make_pluginfile_url($file->get_contextid(), $file->get_component(), $file->get_filearea(), $file->get_itemid(), $file->get_filepath(), $file->get_filename());
echo "<img src='{$imgurl}' />';
}
You'll also need to edit your plugins lib.php file and add a [pluginname]_pluginfile() function - see mod/forum/lib.php, function 'forum_pluginfile' for an example.