Display all images.

  • twkh


    Hi there. How do I display all images from a folder in a post.

    I tried using

    $files = glob("images/*.*");
    for ($i=1; $i<count($files); $i++)
    $num = $files[$i];
    echo '<img src="'.$num.'" alt="random image" />'."  ";

    but it does not link well…. any solutions guys…



    I would recommend the NextGEN Gallery plugin.



    because i am creating something like a directory of hotel images… i want to call the image straight from the folder/directory… instead of using nextgen where i have to import all the images… we’re talking about 100000 images…

    ie.. http://www.example.com/variable1/variable2/*.jpg


    Kenneth John Odle


    Moved to Support in order to comply with the forum rules.

    I also use the Piwigo plugin, because I use the Piwigo gallery on my main website. It is very easy to include pictures from my gallery on my blog. I haven’t done much with it yet because I haven’t had the time, but will in the next few months.

    Other than that, the plugin mentioned above is widely used.



    Syahir Hakim


    What’s wrong with the link? Also, please provide the URL to your site.

Viewing 5 posts - 1 through 5 (of 5 total)

  • You must be logged in to reply to this topic.