to cache pictures first