Media thumbnails are not displaying

Images uploaded to the media library are not displaying the thumbnails. The uploaded images can be viewed when going to edit option but thumbnails give a 404 not found error.