Overriding how an image displays
Wednesday, 01 June 2011 12:38
Last Updated on Wednesday, 01 June 2011 12:47
Written by Administrator
One of the big problems we have is that we have a staging server and then copy that information across to our live server which is proxied via another server. Unfortunately because Drupal uses absolute URLs this breaks things like images. A quick change to the way image cache generates the URLs does the trick.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
function cls2_imagecache($presetname, $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) { // Check is_null() so people can intentionally pass an empty array of // to override the defaults completely. global |










