added resizing for uploaded images