Updated thumbnail and profile code to do jpg, png, and gif