-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·42 lines (32 loc) · 1.83 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Imaginari</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<!-- Add Imaginari script at end of <head> -->
<script src="imaginari.js" type="text/javascript"></script>
</head>
<body>
<div class="wrapper">
<h1><img src="assets/logo.png" alt="Imaginari"></h1>
<h2>Description</h2>
<p>
<strong>imaginari</strong> is a Javascript and backend technique that utilizes cookies and server-side image resizing to serve the most appropriate image to the user without the use of the unsu
pported (for now) <code><picture></code> element, polyfills, and <a href="https://github.com/scottjehl/picturefill">other techniques</a>.
</p>
<h2>How It Works</h2>
<p>
The below example references a massive <a href="http://interfacelift.com/wallpaper/details/3172/lacustrine.html">2880 × 1800 photo</a>. <strong>imaginari</strong> creates a cookie with the window width and pixel density and appends the breakpoint resolution to that image, which calls <code>adaptive-images.php</code>, which then reads the cookie sent in the request, creates the appropriate image, caches it, and returns the image to the user.
</p>
<h2>Thanks to</h2>
<p>
<a href="https://github.com/MattWilcox/Adaptive-Images">Adaptive Images</a> library for the image processing. <a href="https://twitter.com/clarissa">@clarissa</a> for the inspiration from <a href="http://www.slideshare.net/clarissapeterson/responsive-design-tools-resources-16066514">this Refresh DC presentation</a>. And <a href="http://viget.com">Viget</a> for fueling creativity.
</p>
<img src="uploads/lacustrine.jpg" alt="Landscape">
</div>
</body>
</html>