Manual:$wgUpdateCompatibleMetadata

Details
Whether to automatically update the img_metadata field if the metadata field is outdated but compatible with the current version. This update would take place when viewing the image image page.

This setting defaults to false because during a code update, a lot of images could suddenly have outdated metadata, regenerating all of them could overload the server if it is a busy server.