create permalink for gallery on callback