Initializes the gallery display based upon optional query parameters