Deprecating img_relocator

Submitted by Frederic Marand on

In summer 2006, I created the img_relocator module, which was published to my sandbox, and apparently picked up by some Drupal admins, although it was never promoted to full-fledged project status.

As I suggested in march 2007, the URL replace filter module by David Lesieur looked like a promising replacement for that experimental module, and it would be possible at some point to switch to his module.

Well, as I see it, that time has come: with two recent patches ( #255314 and #255332) I submitted today, it seems all use cases of img_relocator can now be covered by URL_replace_filter.

For the most common case, where you want to have image links like <img src="foo.png" alt="foo" /> replaced on the fly by <img src="http://www.example.com/bar/foo.png" alt="foo" />, all it takes is a one-time update to your database: replace your file references to "foo.png" by a "magic" path of your choice, like "magic". Then:

  1. apply the patches to url_replace_filter or use a newer version including these patches if David chooses to validate them
  2. go to admin/settings/url_replace_filter and enable absolute path generation
  3. for each of the content types on which you have enabled the url_replace_filter input filter, configure it with a rule like: magic/ becomes %baseurl/

And that's all there is to it ! Of course, if you meet problems with this change, comment here since there is no issue queue on d.o. for img_relocator, and I'll try to answer here.

After a transition period lasting until 2008/06/30, I will remove img_relocator from my sandbox, to limit confusion on newcomers.