resizing images and using dedicated preview.jpg