Automatically convert all image file fields to media reference fields creating necessary configuration and migrations in modern Drupal

Modern Drupal started its life with only image fields, same as in Drupal 7, but soon added a media system complete with a media library.

Ultimately all that should change is the name of the field (if you go from field_image to field_media_image for example) but you may have to do some templating of the media entity itself. That is preferable to doing crazy things to get specific info out of the media entity (which could perhaps be made clearer to the poor soul here: ).