Options

The Galleria options cover most of the gallery customizations you will need for each implementation. Below you will find a summary of all options available. Click on an option title for more explanations and examples.

These options are the standard options that you can use for all themes. However, themes can add new options and set/modify default values on their own. Please check each theme documentation for full coverage. Custom options for each theme starts with an underscore.

Using options

Galleria options can be configured at anytime using the Galleria.configure function. You can add this code anywhere in your scripts, but we recommend you to put it before the Galleria.run command:

<script>
    Galleria.loadTheme("themes/classic/galleria.classic.min.js");
    Galleria.configure({
        transition: 'fade',
        imageCrop: true
    });
    Galleria.run();
</script>

You can also add options as a second argument when calling Galleria.run:

Galleria.run('.galleria', {
    transition: 'fade',
    imageCrop: true
});

List of options

  • autoplay Sets Galleria to play slidehow when initialized.

  • carousel Toggle the creation of a carousel.

  • carouselSpeed Carousel animation speed in milliseconds.

  • carouselSteps Defines how many “steps” the carousel should take on each nav click.

  • clicknext Helper for adding a click event on the entire stage to move forward.

  • dailymotion Adds player options for the Daliymotion video player

  • dataConfig( [HTML element] ) Defines how Galleria should parse the HTML. Useful for adding custom HTML captions.

  • dataSelector Defines the selector Galleria should look for in the source.

  • dataSort Function to sort the data before using it.

  • dataSource Defines the Galleria data, or the HTML source where the data is found.

  • debug Set this to false to prevent debug messages.

  • dummy Defines a dummy image that will be used if the image can’t be found.

  • easing Defines the easing mode globally.

  • extend( [ options ] ) Add custom functionality to the gallery.

  • fullscreenCrop Sets how Galleria should crop when in fullscreen mode.

  • fullscreenDoubleTap Enabled fullscreen toggle on double-tap for touch devices.

  • fullscreenTransition Defines a different transition for fullscreen mode.

  • height Manually set a gallery height.

  • idleMode Option for turning on/off idle mode.

  • idleTime Defines how long delay before Galleria goes into idle mode.

  • idleSpeed Defines the animation speed in milliseconds when entering/exiting idle mode.

  • imageCrop Defines how Galleria will crop the image.

  • imageMargin Sets a margin between the image and the stage.

  • imagePan Toggles the image pan effect.

  • imagePanSmoothness Defines how smooth ( and CPU consuming ) the pan effect should be.

  • imagePosition Positions the image.

  • imageTimeout Sets a timeout for fetching images.

  • initialTransition Sets a different transition on the the first image.

  • keepSource Lets you keep the source elements.

  • layerFollow Boolean for controlling if the layer will follow the image size or not.

  • lightbox Helper for attaching a lightbox (to zoom in) when the user clicks on an image.

  • lightboxFadeSpeed Defines how fast the lightbox should fade.

  • lightboxTransitionSpeed Defines how fast the lightbox should animate.

  • maxScaleRatio Defines how much Galleria is allowed to upscale images.

  • maxVideoSize Defines how much Galleria is allowed to upscale videos.

  • overlayBackground Defines the background color of the overlay.

  • overlayOpacity Sets how transparent the overlay should be.

  • pauseOnInteraction Toggles if Galleria should stop playing if the user navigates.

  • popupLinks Open Image links in new windows.

  • preload Defines how much Galleria should preload.

  • queue Defines if Galleria should queue the slideshow.

  • responsive Sets Galleria in responsive mode.

  • show Lets you start the slideshow at any image index.

  • showCounter Toggles the counter.

  • showInfo Toggles the caption.

  • showImagenav Toggles the image navigation arrows.

  • swipe Enables the swipe gesture for navigating on touch devices.

  • thumbCrop Same as image_crop for thumbnails.

  • thumbDisplayOrder Defines if the gallery should display the loaded thumbnails in order

  • thumbMargin Same as imageMargin for thumbnails.

  • thumbnails Sets how and if thumbnails should be created.

  • thumbPosition Same as imagePosition for thumbnails.

  • thumbQuality Defines if and how IE should use bicubic image rendering for thumbnails

  • touchTransition Defines a different transition when a touch device is detected.

  • transition Defines what transition to use.

  • transitionSpeed Defines the speed of the transition.

  • trueFullscreen Makes Galleria enter a native fullscreen mode where supported.

  • variation Visual variations of a theme

  • videoPoster Defines if a poster image should be used for videos

  • vimeo Sets options for the Vimeo player

  • wait Defines if and how Galleria should wait until it can be displayed using user interaction.

  • width Manually set a gallery width.

  • youtube Sets options for the YouTube player