Support » Plugin: WordPress Gallery Plugin MaxGalleria » Unable to add images, possible code fix

  • Resolved kokimo1



    We’ve been experiencing an issue on our staging and production multisites where we are unable to add images to Maxgalleria galleries. The “add images” button is unresponsive and new galleries don’t show the option to choose between images or video.

    One of our devs was able to fix it by editing a line in maxgalleria.php. She has to change this line whenever we update the Maxgalleria core, so I thought I’d pass it along for your consideration.

    Below is her message:

    The MaxGalleria problems appear to be caused by the fact they are loading http resources over https. Their references to scripts and css are not set to https, or even better, protocol agnostic.

    If you’re using Chrome or Firefox, open the development tool window and check the console. Safari seems to be more forgiving because I was able to add an image in both galleries. Chrome will load images http images over https but put out a warning in the console.

    I did a bit of digging, and it turns out MaxGalleria is using an outdated way to refer to the plugins directory:

    What they do:

    How it should be:
    define('MAXGALLERIA_PLUGIN_URL', plugin_dir_url() . '/' . MAXGALLERIA_PLUGIN_NAME);


    So I fixed it on staging and production, but every time the plugin is updated this will be rolled back. Best way would be to suggest this fix so it’s fixed upstream. Since I found it for you, I would appreciate it if you forward it onto the plugin maintainers 🙂



    Please let me know if you have any questions.



Viewing 2 replies - 1 through 2 (of 2 total)
  • Just a heads up: that was for an older version of MaxGalleria. For the current version (2.2.2), this line here


    has to be changed to this

    define('MAXGALLERIA_PLUGIN_URL', plugin_dir_url() . '/' . MAXGALLERIA_PLUGIN_NAME);

    Plugin Author arcware


    Ah yes, that’s definitely a change we’ll make. Look for this in the next update, and thanks for bringing this to our attention.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable to add images, possible code fix’ is closed to new replies.