changes for images to work with S3 and file 
tested with carrierwave