It appears that if the $filepath passed to imagecache_create_url contains a % character, the generated URL will be incorrect. This is because alltough the url() is called, url won't encode it properly.

My $filepath = 'sites/default/files/product_images/100% PBT Liner/Skintone.jpg'.

The generated url:

http://example.com/sites/default/files/imagecache/product_images/product... PBT Liner/Skintone.jpg

First of all, why we generate the HTTP prefix is beyond me. That gives problems with HTTPS as I've already seen in the issue queue.

The solution is simply to remove the $GLOBALS['base_url'] prefix.

CommentFileSizeAuthor
#1 imagecache_create_url.patch712 bytesberenddeboer

Comments

berenddeboer’s picture

StatusFileSize
new712 bytes

Oops no patch attached.

fizk’s picture

Status: Needs review » Closed (fixed)

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