I have been having this problem approx 50% of the time, using MacBook and a mixture of jpg and png
the only solution I have found so far is to open the files in photos and make a minor edit (either a crop or an “i’m feeling lucky” type enhancement), the photos then uploading 100% of the time