I wasn’t thinking of making a plugin or similar, I though that might be somewhere in the code but I haven’t been able to find it.
saseev you can export your database and then edit it with something like Ultraedit and replace your old image folder for the new one.