you mean from resolveuid/<uid>/image_mini
to resolveuid/<uid>/@@images/image/mini
?
maybe collective.searchandreplace or rt.bulkmodify can help there.
see also GSoC 2019 idea: Sitewide search & replace
if you get new UIDs while migrating, you have to cover the transforms in your migration process. or is there something built in for this @pbauer?