cropping images and adding in the file