updated for rotation of images and files view