自适应图像ai-cache为空

时间:2015-08-21 01:45:47

标签: php .htaccess

我按照指南行加载了自适应图像,但是我的ai-chache是​​空的,文件大小显然仍然是原始的。我检查了我的htaccess等但是看不到问题。我的编码如下: 在html5头             enter code here的document.cookie = '分辨率=' + Math.max(screen.width,screen.height)+';路径= /';

在htaccess中

php_flag display_errors on
ErrorDocument 404 /error-pages/page_error.php
<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On

  # Adaptive-Images -----------------------------------------------------------------------------------

  # Add any directories you wish to omit from the Adaptive-Images process on a new line, as follows:
  # RewriteCond %{REQUEST_URI} !ignore-this-directory
  # RewriteCond %{REQUEST_URI} !and-ignore-this-directory-too

  # Only applies to folder adaptive-images
  RewriteCond %{REQUEST_URI} adaptive-images

  # don't apply the AI behaviour to images inside AI's cache folder:
  RewriteCond %{REQUEST_URI} !ai-cache

  # Send any GIF, JPG, or PNG request that IS NOT stored inside one of the above directories
  # to adaptive-images.php so we can select appropriately sized versions

  RewriteRule \.(?:jpe?g|gif|png)$ adaptive-images.php

  # END Adaptive-Images -------------------------------------------------------------------------------
</IfModule>

并在root中加载adaptive-php,其中config为

$resolutions   = array(1382, 992, 768, 480); // the resolution break-points to use (screen widths, in pixels)
$cache_path    = "ai-cache"; // where to store the generated re-sized images. Specify from your document root!
$jpg_quality   = 75; // the quality of any generated JPGs on a scale of 0 to 100
$sharpen       = TRUE; // Shrinking images can blur details, perform a sharpen on re-scaled images?
$watch_cache   = TRUE; // check that the adapted image isn't stale (ensures updated source images are re-cached)
$browser_cache = 60*60*24*7;

按照下载的所有其他方式。

0 个答案:

没有答案