Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (37 sloc) 1.85 KB
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Responsive Images Test Page</title>
var rwd_options = {
translateUrl: function(url) {
return url.replace(/\.(jpe?g|png|gif)$$/, function(str, p1) {
return "@2x." + p1;
<script src="rwd-images/rwd-images.js"></script>
<!-- demo styles -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
body { font-family: Helvetica, sans-serif; background: #222; color: #eee; margin: 20px auto; padding: 0 20px; max-width: 980px; }
img { border: 0; width: 100%; display: block; max-width: 100%; }
#cred { font-size: .7em; color: #aaa; }
a { color: #fff; }
.minimal { max-width: 50%; margin: 20px auto;}
<h1>Responsive Images Test Page</h1>
<p>In supported browsers, the following images will load either small or large versions depending on the size they need to be rendered at, making a single 1kb request before requesting the appropriate size.</p>
<!-- ADD THE "r." prefix to your image extension for any responsive images -->
<img src="sample-content/running.jpg?r=/sample-content/running-lrg.jpg" width="320" data-width="320">
<img src="sample-content/second-running.jpg?r" width="320" data-width="320" class="minimal">
<p>The next image, does not have a high source version, so shows at the normal resolution.</p>
<!-- Check that this does not get 'responsified' -->
<img src="sample-content/second-running.jpg" width="320" data-width="320" class="minimal">
<p id="cred"><strong>Photo credit (CC):</strong> Cia de Foto <a href="">Flickr Creative Commons</a></p>