This report is from Brian Puccio:

I was wondering if there was a reason that was chosen to use relative URL's with respect to the images aside from the fact that if someone changes domain names, everything will still work. The issue I have is somewhat related to the issues here:

http://drupal.org/node/31032

As well as in the link that Boris Mann mentioned. My RSS reader, and several others, choke on relative URLs.

Maybe an option "use relative" or "use absolute" URLs is a possibility for this module.

Comments

David Hull’s picture

I'm not sure I understand this issue. If image-filter generates something like

<a href="A"><img src="B" /></a>

is the problem that A is relative or B is relative?

The image-filter module calls drupal's l() function to generate the hyperlink A with the default options, which generates relative paths. This could be changed, or made an option.

The image-filter module calls the file module's file_create_url() function to create the image link B. This either generates an absolute direct link, or a relative link that goes through drupal, depending on whether the "file system settings" "download method" is set to public or private on "Home > Administer > Settings".

I'm guessing is that the issue is URL A. I'm willing to change it to absolute; I didn't realize that it was an issue, so I just used a relative link because it was the default.

If you apply the following patch to image_filter.module, it will generate an absolute link instead of a relative link.

--- image_filter.module.orig    Thu Oct 27 17:09:40 2005
+++ image_filter.module Thu Oct 27 17:10:12 2005
@@ -202,7 +202,7 @@
     ($img->class ? " class=\"$img->class\"" : '') .
     ($img->style ? " style=\"$img->style\"" : '') . " />";
   return ($img->link
-          ? l($imgtag, $img->link, array(), NULL, NULL, FALSE, TRUE)
+          ? l($imgtag, $img->link, array(), NULL, NULL, TRUE, TRUE)
           : $imgtag);
 }

Please try it out and let me know if this solves your problem.

David Hull’s picture

Status: Active » Needs review
David Hull’s picture

Status: Needs review » Closed (fixed)

Patch applied in revision 1.19.