import json


def read_gallery_config(gallery_path):
    """
    Read the gallery config from the gallery.json file
    :param gallery_path: path to the JSON file
    :return: dict containing the gallery config
    """
    try:
        with open(gallery_path, "r") as gallery_in:
            return json.load(gallery_in)
    except OSError:
        return []