'How to add settings to lightGallery

Im using lightGallery to open a lightbox of images using the solution below, which was found here: https://stackoverflow.com/a/54764289/1390648

Where can I add the settings from the lightGallery docs to the code below to control the mode, speed, and other settings?

Each time I try to add them in, it breaks the lightGallery from opening.

function initLightGallery() {
    lightGallery(document.getElementById('lightgallery'));
    $("#magic_start").on("click", () => {
        $("#lightgallery :first-child > img").trigger("click");
    });
}
initLightGallery();


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source