Problem/Motivation
After migration the images(files) are in the public folder, but not inside the nodes.
I tried this module to fix the issue, but it wouldn't work with D9.
After looking into some other solutions I decided to check the tables in the database.
There are 2 tables, that are connected to this problem: file_usage and file_managed
By just copying data in MySQL with SQL from d7 database to d9 I was able to fix images in this "quick and dirty" way:
# file_usage tables have exactly the same fields. d7 and d9 are the names of databases. SQLs executed in SQLyog.
INSERT INTO d9.file_usage (fid, module, `type`, id, `count`)
SELECT fid, module, `type`, id, `count`
FROM d7.file_usage;
# file_managed table in D9 has a few extra fields: UUID, langcode and CHANGED.
# UUID field that was just inserted the same fid value in it.
INSERT INTO d9.file_managed (fid, UUID, langcode, uid, filename, uri, filemime, filesize, STATUS, created, CHANGED)
SELECT fid, fid, "en", uid, filename, uri, filemime, filesize, STATUS, TIMESTAMP, TIMESTAMP
FROM d7.file_managed;
After this please still verify that your images are now available inside your nodes.
Hope it would help someone as well, thanks.