prepare gallery edit