Changed the way image resizing is handled

Fixed the way that image resizing is handled for new photos that are being uploaded.