Added a feature that makes it possible to disable the preloading of next and previous image