Skip to content

Commit 0db6f6e

Browse files
committed
change images to use inline transformations when possible. fix image link in list
1 parent 4736b70 commit 0db6f6e

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

samples/photo_album/src/main/webapp/WEB-INF/pages/photos.jsp

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ requested transformations. This also shows how to chain transformations -->
4545
<c:forEach items="${photos}" var="photo">
4646
<div class="photo">
4747
<h2>${photo.title}</h2>
48-
<a href="<cl:url src="${photo.image}"/>" target="_blank">
48+
<a href="<cl:url src="${photo.image}" format="jpg"/>" target="_blank">
4949
<cl:image src="${photo.image}" extraClasses="thumbnail inline" width="150" height="150" crop="fit" quality="80" format="jpg"/>
5050
</a>
5151

@@ -58,11 +58,7 @@ requested transformations. This also shows how to chain transformations -->
5858
<table class="thumbnails">
5959
<td>
6060
<div class="thumbnail_holder">
61-
<cl:image src="${photo.image}" extraClasses="thumbnail inline" format="jpg">
62-
<jsp:attribute name="transformation">
63-
<cl:transformation crop="fill" height="150" width="150" radius="10"/>
64-
</jsp:attribute>
65-
</cl:image>
61+
<cl:image src="${photo.image}" extraClasses="thumbnail inline" crop="fill" height="150" width="150" radius="10" format="jpg"/>
6662
</div>
6763
<table class="info">
6864
<tr><td>crop</td><td>fill</td></tr>
@@ -74,11 +70,7 @@ requested transformations. This also shows how to chain transformations -->
7470
</td>
7571
<td>
7672
<div class="thumbnail_holder">
77-
<cl:image src="${photo.image}" extraClasses="thumbnail inline" format="jpg">
78-
<jsp:attribute name="transformation">
79-
<cl:transformation crop="scale" height="150" width="150"/>
80-
</jsp:attribute>
81-
</cl:image>
73+
<cl:image src="${photo.image}" extraClasses="thumbnail inline" crop="scale" height="150" width="150" format="jpg"/>
8274
</div>
8375
<table class="info">
8476
<tr><td>crop</td><td>scale</td></tr>
@@ -89,11 +81,7 @@ requested transformations. This also shows how to chain transformations -->
8981
</td>
9082
<td>
9183
<div class="thumbnail_holder">
92-
<cl:image src="${photo.image}" extraClasses="thumbnail inline" format="jpg">
93-
<jsp:attribute name="transformation">
94-
<cl:transformation crop="fit" height="150" width="150"/>
95-
</jsp:attribute>
96-
</cl:image>
84+
<cl:image src="${photo.image}" extraClasses="thumbnail inline" crop="fit" height="150" width="150" format="jpg"/>
9785
</div>
9886
<table class="info">
9987
<tr><td>crop</td><td>fit</td></tr>
@@ -104,11 +92,7 @@ requested transformations. This also shows how to chain transformations -->
10492
</td>
10593
<td>
10694
<div class="thumbnail_holder">
107-
<cl:image src="${photo.image}" extraClasses="thumbnail inline" format="jpg">
108-
<jsp:attribute name="transformation">
109-
<cl:transformation crop="thumb" gravity="face" height="150" width="150"/>
110-
</jsp:attribute>
111-
</cl:image>
95+
<cl:image src="${photo.image}" extraClasses="thumbnail inline" crop="thumb" gravity="face" height="150" width="150" format="jpg"/>
11296
</div>
11397
<table class="info">
11498
<tr><td>crop</td><td>thumb</td></tr>
@@ -120,9 +104,8 @@ requested transformations. This also shows how to chain transformations -->
120104
</td>
121105
<td>
122106
<div class="thumbnail_holder">
123-
<cl:image src="${photo.image}" extraClasses="thumbnail inline" format="png">
107+
<cl:image src="${photo.image}" extraClasses="thumbnail inline" format="png" angle="20">
124108
<jsp:attribute name="transformation">
125-
<cl:transformation angle="20"/>
126109
<cl:transformation crop="fill" gravity="north" height="150" width="150" effect="sepia"/>
127110
</jsp:attribute>
128111
</cl:image>

samples/photo_album/src/main/webapp/WEB-INF/pages/pre.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>Photo Album</title>
66
<link type="text/css" rel="stylesheet" media="all" href="<c:url value="/stylesheets/application.css"/>">
77
<link rel="shortcut icon"
8-
href="<cl:url src="http://cloudinary.com/favicon.png" type="fetch"/>" />
8+
href="<cl:url src="http://cloudinary.com/favicon.png" type="fetch" effect="sepia"/>" />
99
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
1010
</head>
1111
<body>

0 commit comments

Comments
 (0)