diff --git a/CHANGELOG.md b/CHANGELOG.md
index ebe6b7c40c866b58e8b0a6536d37f39c1f3773a2..266922ac305eff3a4814191c1fcd6d2aad25b249 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 * Added a new tool, `export_synapse_for_import`, which can be used to do an offline import from Synapse.
   * After running this tool, use the `gdpr_import` tool to bring the export into the media repo.
 
+### Fixed
+
+* Fixed thumbnails for invalid JPEGs.
+
 ## [1.2.0] - August 2nd, 2020
 
 ### Upgrade notes
diff --git a/util/util_exif/exif.go b/util/util_exif/exif.go
index e3afe8f37d63999cef83f8368e267d56f336bbc2..948da502d0eff58dab6b636b4bdba85deedc9ea9 100644
--- a/util/util_exif/exif.go
+++ b/util/util_exif/exif.go
@@ -40,6 +40,11 @@ func GetExifOrientation(img io.ReadCloser) (*ExifOrientation, error) {
 		return nil, errors.New("exif: error parsing orientation: " + err.Error())
 	}
 
+	// Some devices produce invalid exif data when they intend to mean "no orientation"
+	if orientation == 0 {
+		return nil, nil
+	}
+
 	if orientation < 1 || orientation > 8 {
 		return nil, errors.New(fmt.Sprintf("orientation out of range: %d", orientation))
 	}