-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex-cloudinary-responsive-solution.html
More file actions
43 lines (37 loc) · 1.03 KB
/
index-cloudinary-responsive-solution.html
File metadata and controls
43 lines (37 loc) · 1.03 KB
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
43
<html>
<head>
<link rel="shortcut icon" href="http://cloudinary.com/images/favicon-32x32.png" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
#app {
padding-left: 8px;
text-align: center;
}
#gallery {
width: 50vw;
margin-left: auto;
margin-right: auto;
}
img {
width: 100%;
display: block;
}
</style>
</head>
<body>
<h1>Automatic responsive images using Cloudinary</h1>
<div id="app">
<div id="gallery">
<img src="" data-src-cache="http://res.cloudinary.com/demo/image/upload/c_scale,w_auto/car_lady_dog.jpg" class="cld-responsive">
</div>
</div>
<script src="https://rawgit.com/cloudinary/pkg-cloudinary-core/master/cloudinary-core-shrinkwrap.js"></script>
<script type="text/javascript">
const cl = new cloudinary.Cloudinary({ cloud_name: 'demo' });
// Render responsive image
cl.responsive();
</script>
</body>
</html>