fbpx imagecache | ComputerMinds Skip to main content

Articles tagged with "imagecache"

Making product images consistent with image styles

We’ve recently given the dimplex.co.uk site a new face lift and stumbled across an interesting problem during development when it came to implementing the new product carousel on their product pages, more specifically, the handling of the images themselves.

The design brief stipulated that the transparent studio style product images required a light grey background behind them, giving the impression of a product floating nicely in the middle of a light grey surrounding.

We had 2 problems here:

1. A lot of the studio style product images didn’t have sufficient transparent space around themselves and we ended up with unsightly results; images would...

Read more

Drupal - imagecache problems with special characters

27th Sep 2008

We came across this problem on one of our Drupal sites the other day, someone uploaded an image with an ampersand in the filename, and imagecache refused to display the image. A bit of investigating revealed that imagecache had a problem with a number of special characters in the image filenames.

The solution is a little imagecache theme override - you can see examples for both Drupal5 and Drupal6 below

Drupal 5 version


function phptemplate_imagecache($namespace, $path, $alt = '', $title = '',
 $attributes = NULL) {
  $attributes = drupal_attributes($attributes);
  $imagecache_path = file_create_url(file_directory_path() .'/imagecache/'.
 $namespace .'/'. drupal_urlencode($path));
  return ''. check_plain($alt) .'';
}...
Read more