Im having an issue when I move my site and image urls become broken. For the node view I can fix this with Pathauto, but this doesn't fix the node edit view.

Ive read a few posts about using a patch to make this module use relative paths. Will this solve the problem? What if the page's url changes from say to, will the links break again?

This is a real issue for me as im working in a very agile way so im frequently moving the site from my development environment to a server to allow the client to add content, but making a new copy each time eg and then

Really pulling my hair out over this! Any help much appreciated. Thanks


quicksketch’s picture

In your situation, using relative links will not help because even then, links are only relative to the root of the server. If Drupal is installed in a different directory name based on dev/production, there's no consistent way for Insert module to generate URLs that will work on both servers.

The only solution I think you have available is to use Pathologic module to rewrite the contents of your fields so that URLs will work on both servers.

jdln’s picture

Sorry for the late reply. I found this post as ive run into the same issue again.

With pathologic I can clean up the output so the node view will work fine. However, when you edit the node pathologic hasnt done anything yet so the preview of the image is wrong. Is there no solution to this? Thanks

quicksketch’s picture

Is there no solution to this?

Generally, no. I'm not aware of one. I would try to develop a workflow where you're not moving content from the development server, or set up your development server to use a path structure that matches production. It's not difficult to change your localhost from being to http://example.local (that's what I do). Or if the dev server is remote, set up That way your path structure matches on localhost/dev/live.