Gallery scripts are loaded multiple times

When I have multiple galleries on a page, it loads the gallery scripts (magnific-popup.css and jquery.magnific-popup.min.js) for each gallery individually.

So if I have 5 or 6 galleries on one page, it downloads the scripts 5 or 6 times.
This lengthens the charging time of the page.

Can I change something somewhere, so that it loads the two scripts only a maximum of once per page or will this come in an update?

    I also do not like to load multiple scripts.
    My solution for galleries, forms, and the like:
    In the folder template, create a new folder migallery (an example is single).
    Create / copy somefile layout.php,
    Insert:
    <link href="<?php echo $path; ?>/migallery/slider/flexslider.css" rel="stylesheet" />
    <link rel="stylesheet" href="<?php echo $path; ?>/migallery/css/magnific-popup.css">
    <script src="<?php echo $path; ?>/migallery/slider/jquery.flexslider-min.js"></script>
    <script src="<?php echo $path; ?>/migallery/js/lightbox/jquery.magnific-popup.min.js"></script>

    Copy / paste the folders slider and lightbox to folder migallery.
    Edit the path .css, .js ...
    Create a backup of files, tags / slide.php and gal.php.
    The files gal and slide, remove the reference to .css and .js

    Remember the {{template: migallery}}.
1 Like

You can try the script gal-mi1.php

http://ivaro.euweb.cz/downloads/gal-mi1.zip

Help:

tag {{gal-mi1:gallery1:unique-name:75}}

gal-mi1: script name is placed in the folder “inc / tags / gal-mi1.php”.
You can rename as needed.
gallery1: is the name of the gallery.
unique-name: a unique name distinguishing the different galleries on one page.
75: the height in pixels = (height: 75px;).

This gallery does not control settings in config.php!

1 Like

No longer an issue for latest version :slight_smile: