cache gallery and share images