1

I recently copied my site from the dev server to a test server, and I noticed that a lot of images which were placed using the Media module have src= attributes that point to the old server. Ie., <img src='http://oldsite.com'...> I don't see any settings within the configurable options for the Media module which will update the links.

I know that WordPress has a handy link updater plug-in called Velvet Blue, or something like that. Does anyone know of a similar module for Drupal?

  • Just for the record.. What Drupal version? – sanzante Apr 10 '14 at 16:57
5

What you are looking for is the Pathologic module.

Pathologic is an input filter which can correct paths in links and images in your Drupal content in situations which would otherwise cause them to “break;” for example, if the URL of the site changes, or the content was moved to a different server.

Cheers,

| improve this answer | |
0

I was recently working on Drupal multisite to a single site conversion and ran into the same problem. I solved by running this SQL command

update `files` set filepath = replace(filepath,'sites/<my_site_name>/files','sites/default/files');

which updated the file paths of my files in the files table. You can do something similar for images used in content. I think you need to target the node_revision table and the body column. So, something like this:

update `node_revision` set body = replace(body,'sites/<my_site_name>/files','sites/default/files');

Source

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.