• Resolved tedmac21

    (@tedmac21)


    I have set up a gallery to dynamically pull from a directory on my server. This works when I first set up the gallery, and the images load, however as I add more images to the directory they are not dynamically loading to the gallery. The images are added via front-end upload using WPForms. Any reasons this could be happening?

    Also, videos present in the folder are not loading at all.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support elviiso

    (@elviiso)

    Hi @tedmac21

    Thanks for reaching out about this!

    Just to clarify, the Server Folder feature in FooGallery is designed to work only with images, not videos or other media types. That’s why the videos in the folder weren’t being added.

    If you’d like to create a gallery that includes both, you can first add your images through the media library, then import the videos separately. Here’s a quick guide for adding videos: https://fooplugins.com/documentation/foogallery/pro-expert/foogallery-pro-video/

    As for the issue you’re seeing with images not loading dynamically when using the Server Folder datasource, this is likely due to our built-in 24-hour caching. This caching helps reduce server load by avoiding repeated folder reads every time the gallery loads, especially as the gallery has more and more images added to it as in your case.

    To reflect new images immediately, you can simply edit and update the gallery in your WordPress admin, which will force a cache refresh.

    If you’d prefer to shorten the cache window, you can add this snippet to your functions.php file to change it (e.g. to 3 hours):

    add_filter( 'foogallery_datasource_folder_expiry', 'foogallery_datasource_folder_expiry_override' );
    function foogallery_datasource_folder_expiry_override( $default ) {
    return 3; // sets cache duration to 3 hours
    }

    If you have any questions, don’t hesitate to ask.

    Kind regards,
    Elvis.

    Thread Starter tedmac21

    (@tedmac21)

    That helped, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Dynamic loading from file’ is closed to new replies.