This project is not covered by Drupal’s security advisory policy.

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

  1. Enable File Link Remap: Feeds Tamper.
  2. Go to Structure › Feeds › [feed type] › Tamper and add "Import linked files from source site" to your HTML source (body, field_corpo, …).
  3. Set Allowed source domains, e.g. example.com. Nothing outside this list is fetched.
  4. 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.
  5. 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.

Supporting organizations: 

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • Project categories: Import and export
  • Ecosystem: Feeds Tamper
  • Created by luissousa21 on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases