Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images created in ai-cache but only for 480px #117

Closed
8wgremlin opened this issue Apr 25, 2013 · 2 comments
Closed

Images created in ai-cache but only for 480px #117

8wgremlin opened this issue Apr 25, 2013 · 2 comments

Comments

@8wgremlin
Copy link

I have a simple test site http://martialarts.greyveil.com
in the root of this I have the .htaccess and the adaptive-images.php.

The image doesn't appear, unless I view it on my iPhone.
The image isn't loaded on an iPad or the desk top version (resolution 1920px) doesn't create an image, doesn't load an image, and the only error/warning messages I get in chrome developer tools is;

Resource interpreted as Image but transferred with MIME type text/html: "http://martialarts.greyveil.com/img/reception.jpg".

$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; // How long the BROWSER cache should last (seconds, minutes, hours, days. 7days by default)

Ideas?

@cferdinandi
Copy link

  1. Check the javascript you're using to set your cookie. If you manually set it to 480 to test on your desktop, you may have forgotten to set it back.
  2. How big is the original? If it's smaller than 768, AI won't create a second version of it. It will just serve the original.

As for the incorrect MIME type - that's a server setting issue that you can also fix via .htaccess.

@MattWilcox
Copy link
Owner

In addition to the above advice, it sounds like you may be running out of RAM on the server, if you're on a shared server this is especially likely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants