Posted by antoniocuga on March 5, 2015 at 4:06pm
Hi folks. I trying to configure the files directory in my Debian Server, but the images styles doesn't generate. Anyone know about this? there is a specific permission for this directory?
I hope anyone can help me.
Cheers.
Comments
Temp Solution
You can use this module to generate the image styles on upload https://www.drupal.org/project/imageinfo_cache
Lighttpd requires conditional rewrite
You need to setup lighttpd such that it conditionally rewrites the URLs to the images styles if the file does not exist yet. Then drupal generates the file and subsequent requests are handled by lighttpd instead. Here's the config I'm using:
url.rewrite-once = (
"^/([^.?])\?(.)$" => "/index.php?q=$1&$2",
"^/([^.?])$" => "/index.php?q=$1",
"^/rss.xml" => "/index.php?q=rss.xml",
)
url.rewrite-if-not-file = (
"^/(files/styles/.)\?(.)$" => "/index.php?q=$1&$2",
"^/(files/styles/.)$" => "/index.php?q=$1",
)
We've been struggling with this exact problem and it took a while to debug what was going wrong.