PDA

View Full Version : Prepend redirection URL to IMG tags


bkaul
05-15-2007, 03:53 PM
I've set up a mirrored image redirection page, like that at http://imgred.com/ and would like it to be automatically prepended to any URL in an [IMG] tag, e.g. http://www.google.com/intl/en_ALL/images/logo.gif would become something like http://imgred.com/http://www.google.com/intl/en_ALL/images/logo.gif if wrapped in an [img] tag - I suspect this could be done at bbcode_parse_complete but I don't have the background to actually write the plugin to do it. Currently, we're using a custom BBCode [img2] to do this, but it'd be nice to get this integrated into the default [img] tags for ease of use.

(The purpose of the image redirection site is to automatically locally rehost images rather than leeching bandwidth from the source page)

Dismounted
05-16-2007, 07:16 AM
Possible with tweaking of a hack. Search for hacks that anonymize links (such as my vbAnonymizer) and change some of the code to get it working with images.