Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Smarter handling of Retina type displays
Previous AI behaviour meant that supporting Retina required adding very high values in the $resolutions array. This is sub-optimal: 1) This array is meant to be nothing more than the same values as your media query breakpoints. Adding larger ones isn't intuitive. 2) When no cookie is set, AI sends non-mobile devices the largest $resolution value, which in this case could be far too large for most people. AI is now much smarter, you do not need to edit the $resolutions array; just leave that as your CSS MQ sizes. AI now auto-detects the pixel density of any high DPI device and either picks a matching size from the existing array, or creates new high-dpi images which are multiples of your chosen $resolutions values. NOTE: If you see folders in the ai-cache directory which are *larger* than any defined in your $resolutions array, it is because someone with a high DPI / Retina display visited your site, and AI was able to generate the required image.
- Loading branch information