refactored image resize to avoid double code
first basic version of viewfolder