local gallery implementation