File Link Remap
Migrated content keeps pointing at the site it came from. Images and documents still load from an old domain. File Link Remap fixes that during the import, so the rewrite is reapplied every run instead of being overwritten by the next one.
How to use it
- Enable File Link Remap: Feeds Tamper.
- Go to Structure › Feeds › [feed type] › Tamper and add "Import linked files from source site" to your HTML source (body, field_corpo, …).
- Set Allowed source domains, e.g.
example.com. Nothing outside this list is fetched. - Set Source base URL, e.g.
https://www.example.com— migrated markup usually carries relative paths, and without a base there is nothing to resolve them against. - Put the plugin last in the chain for that source. Anything running after it will operate on the local URLs it has just written.
On import it rewrites the src on images and the href on file links, and adds the data-entity-type and data-entity-uuid attributes, so core tracks file usage and re-resolves image src on render. Nothing else in the markup is touched.
Files already downloaded are reused, not fetched again. A URL that cannot be fetched is left as it is, counted and logged, an import is never failed over one missing image.
drush file-link-remap:scan reports what still points at the old site; --fail-over=N turns it into a build gate.
Requirements
Drupal 10.5+ or 11, Tamper, Feeds Tamper.
Security
The module makes server-side HTTP requests, so it stays disabled until you list allowed source domains. It refuses private, reserved, loopback and cloud-metadata addresses (including IPv4-in-IPv6 forms), re-validates every redirect hop, and pins the connection to the validated IP.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0-beta1 | Pre-release | 10–11 | First release. Downloads the files imported HTML links to and repoints the markup at local managed files. | Sep 1, 2026 |