Skip to content

Commit 4573a7c

Browse files
committed
Updated routes.
1 parent cfb07ae commit 4573a7c

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

routing-resize/definitions/resize.js

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
1-
F.resize('/img/small/', 100, 100, {}, '/img/');
2-
F.resize('/img/grayscale/', null, null, { cache: false, grayscale: true }, '/img/');
3-
F.resize('/img/filters/', null, null, { blur: true, sepia: true, flip: true, flop: true }, '/img/');
4-
F.resize('/img/50percent/', '50%', null, {}, '/img/');
5-
F.resize('/img/medium/', '70%', null, {}, '/img/', ['.png']);
1+
// Works only in total.js 2.0
2+
3+
F.resize('/img/small/', function(image) {
4+
image.resize(100, 100);
5+
image.quality(90);
6+
image.minify();
7+
}, ['/img/']);
8+
9+
F.resize('/img/grayscale/', function(image) {
10+
image.grayscale();
11+
}, ['/img/', 'nocache']);
12+
13+
F.resize('/img/filters/', function(image) {
14+
image.blur(1);
15+
image.sepia();
16+
image.flip();
17+
image.flop();
18+
}, ['/img/']);
19+
20+
F.resize('/img/50percent/', function(image) {
21+
image.resize('50%');
22+
}, ['/img/']);
23+
24+
F.resize('/img/medium/', function(image) {
25+
image.resize('70%');
26+
}, ['/img/', '.png']);

0 commit comments

Comments
 (0)