|
1 | 1 | # Adaptive Images |
2 | | -The is an adapted ColdFusion port of Matt Wilcox's [Adaptive Images](http://adaptive-images.com/), a server-side solution to automatically create, cache, and deliver device-appropriate versions of your website’s images. |
| 2 | +The is a ColdFusion version of Matt Wilcox's [Adaptive Images](http://adaptive-images.com/), a server-side solution to automatically create, cache, and deliver device-appropriate versions of your website’s images. |
3 | 3 |
|
4 | | -If your design is "responsive", so that images are not given a fixed width or height but scaled to the width of their container, you can save significant bandwidth and speed up client load times by using AdaptiveImages to ensure end users do not have to download images that are larger than their device's screen width. |
| 4 | +If your site's design is "responsive", so that images are not given a fixed width or height but scaled to the width of their container, you can save bandwidth and speed up client load times by using AdaptiveImages to ensure end users do not have to download images intended for the widest screens. Instead, smaller versions will be created and served as necessary, according to the detected resolution of the device. |
5 | 5 |
|
6 | 6 | ## Acknowledgements |
7 | 7 | In addition to [Matt's PHP code](https://github.com/MattWilcox/Adaptive-Images), I also took inspiration and code from [Raymond Camden's ColdFusion fork](https://github.com/cfjedimaster/Adaptive-Images) |
8 | 8 |
|
9 | 9 | ### Differences |
10 | | -However, this is not a direct port of either project, placing more emphasis on performance through: |
| 10 | +However, this is not a direct port of either project. It places more emphasis on performance through: |
11 | 11 |
|
12 | | - - in-memory caching of file path and existence tests to reduce disk access; |
| 12 | + - in-memory caching of file path and existence tests to minimise disk access; |
13 | 13 | - assuming the source file existence check has been handled by the web server rewrite engine; |
14 | | - - removal of some configuration options such as the `cache_path` - cached files are stored by convention in numbered folders in the same location as the source image; |
| 14 | + - removal of some configuration options such as the `cache_path` - cached files are stored by convention in folders named by resolution width in the same location as the source image; |
15 | 15 | - checking that the bytesize of the resized file is no larger than the original (sometimes downscaling an image can actually increase its file size); |
16 | 16 |
|
17 | 17 | There are additional file and memory cache maintenance functions to ensure they don't become stale. |
@@ -72,7 +72,7 @@ You can pass these arguments when instantiating AdaptiveImages.cfc: |
72 | 72 | - `pixelDensityMultiplier` number between 1 and 3: default=1.5. By how much to multiply the resolution for "retina" displays as detected by the resolution cookie. |
73 | 73 | - `jpgQuality` number between 1 and 100: default=50. The quality of resized JPGs. |
74 | 74 | - `sharpen` boolean: default=true. Shrinking images can blur details. Perform a sharpen on re-scaled images? |
75 | | - - `interpolation` string: defalt="highPerformance". Interpolation algorithm to use when scaling/resizing file (depending on whether performance or quality is paramount). |
| 75 | + - `interpolation` string: default="highPerformance". Interpolation algorithm to use when scaling/resizing file (depending on whether performance or quality is paramount). |
76 | 76 | - `writeLogs` boolean: default=false. Whether or not to log activity - don't use in production. |
77 | 77 | - `logFilename`: string: default="adaptive-images". If logging, the name of the file. |
78 | 78 |
|
|
0 commit comments