I have imagecache installed and I'm using views. In my fields in views I have selected one of the presets for my images to resize. When I try to view my completed page the path to the thumbnail is incorrect. It links to http://www.example.com/sites/default/files/imagecache/album/%252Fimages/...

Where did that %252F come from? how can I fix this to show the correct url

Comments

fugazi’s picture

same problem

ruriko’s picture

can anyone help!

sandrewj’s picture

That will show up if there is a leading slash in the image path.

ruriko’s picture

There is no leading slash in the original image path. It works if I show full size image but it doesn't work when I select one of imagecache's presets

sandrewj’s picture

The derivative image path is created from the original image path:
if the image path starts with the file directory path, that section is removed along with the next slash

sites/default/files/images/pic.jpg -> images/pic.jpg

the file directory path, the word imagecache, the presetname and the processed path from above are combined:

sites/default/files  /   imagecache   /   presetname   /   images/pic.jpg

the result is processed by drupal, which converts // in a path to /%252F

since you have a %252F between the presetname and the truncated image path, either:
1. The view is sending a path without the leading file directory path, but with a leading slash
2. The presetname has a trailing slash

fizk’s picture

Status: Active » Closed (fixed)

Please reopen if this is still an issue with ImageCache 6.x-2.0-rc1.