I have the following code to display an image from folder fname ( upload/2017/05/fname)

 [php]
$upload_dir = wp_upload_dir();
$logo_dir = ( $upload_dir['baseurl'] . '/2017/05/fname/' );
echo $logo_dir . '-----<br />';
$images = glob( $logo_dir . "*.PNG" );
foreach( $images as $image ) {
echo "$image";
}
[/php]

but this shows only the path such as https://example.com/jobs/wp-content/uploads/2017/05/fname/—–

I want code that display all the images from the folder in a page.

Read more here: Image display issue in WordPress


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: