When rotating pictures during edit, write the EXIF orientation tag with the right type (unsigned short) instead of signed long. PhotoImageProvider: change its behaviour to only rectify the EXIF orientation tag type when necessary (removes all other behaviours: caching, etc.) Fixes: #1541210 Approved by: PS Jenkins bot, Arthur Mello