Hi,

In imagecache.inc, imagecache_create_url function should be used instead of insert_create_url, it doesn't make much difference but if there are any customisations for imagecache (cdn module for example) we get the correct CDN aware path for the image.

Cheers
Dom

Comments

DeeLay’s picture

StatusFileSize
new871 bytes

Attached patch

DeeLay’s picture

Status: Active » Needs review
quicksketch’s picture

Category: bug » feature
Status: Needs review » Needs work

Hm, I'm not sure we can make this change because a bunch of whiners are always complaining about relative vs. absolute paths, which is configurable only when using insert_create_url() and not when using imagecache_create_url() (which will always be absolute I think). Are there changes we can make to insert_create_url() that would make it work for you instead?

DeeLay’s picture

Yeah I saw that issue being raised, but figured they would use the $vars['filepath']. Is that not the case?

DeeLay’s picture

Status: Needs work » Needs review
StatusFileSize
new1.41 KB

OK, given that we need to have options for relative and absolute URLs, so we can do that using imagecache_create_path and imagecache_create_url.

How about something like this?

quicksketch’s picture

Nice, that looks like it would work for me. I'll need to test and review it.

DeeLay’s picture

Currently working fine on economist.com, if that helps ;-)

Using absolute paths.

Mark Theunissen’s picture

Yup, we have been using this for a while.

quicksketch’s picture

Status: Needs review » Fixed

Thanks, committed but only to 6.x branch. The 7.x branch doesn't yet support "relative" paths at all due to stream wrappers not generically supporting relative paths.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.