diff --git a/modules/config.js b/modules/config.js index c9b6725..eb03af3 100644 --- a/modules/config.js +++ b/modules/config.js @@ -1,7 +1,7 @@ var config = { min_size: 0, // < 0 will (obviously) cause crash max_size: 512, // too big values might lead to slow response time or DoS - default_size: 180, // size to be used when no size given + default_size: 160, // size to be used when no size given local_cache_time: 3600, // seconds until we will check if the image changed browser_cache_time: 3600, // seconds until browser will request image again http_timeout: 1000, // ms until connection to mojang is dropped diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 601e61c..29d0447 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -30,36 +30,36 @@ mark.green { word-wrap: break-word; } .sideface { - width: 180px; - height: 180px; + width: 160px; + height: 160px; } .sideface.Jake0oo0 { - background:url("/avatars/2d5aa9cdaeb049189930461fc9b91cc5?size=180&default=alex"); + background:url("/avatars/2d5aa9cdaeb049189930461fc9b91cc5?size=160&default=alex"); } .sideface.Jake0oo0:hover { - background:url("/avatars/2d5aa9cdaeb049189930461fc9b91cc5?size=180&default=alex&helm=true"); + background:url("/avatars/2d5aa9cdaeb049189930461fc9b91cc5?size=160&default=alex&helm=true"); } .sideface.redstone_sheep { - background:url("/avatars/ae795aa86327408e92ab25c8a59f3ba1?size=180&default=alex"); + background:url("/avatars/ae795aa86327408e92ab25c8a59f3ba1?size=160&default=alex"); } .sideface.redstone_sheep:hover { - background:url("/avatars/ae795aa86327408e92ab25c8a59f3ba1?size=180&default=alex&helm=true"); + background:url("/avatars/ae795aa86327408e92ab25c8a59f3ba1?size=160&default=alex&helm=true"); } .sideface.Notch { - background:url("/avatars/069a79f444e94726a5befca90e38aaf5?size=180&default=alex"); + background:url("/avatars/069a79f444e94726a5befca90e38aaf5?size=160&default=alex"); } .sideface.Notch:hover { - background:url("/avatars/069a79f444e94726a5befca90e38aaf5?size=180&default=alex&helm=true"); + background:url("/avatars/069a79f444e94726a5befca90e38aaf5?size=160&default=alex&helm=true"); } .sideface.sk89q { - background:url("/avatars/0ea8eca3dbf647cc9d1ac64551ca975c?size=180&default=alex"); + background:url("/avatars/0ea8eca3dbf647cc9d1ac64551ca975c?size=160&default=alex"); } .sideface.sk89q:hover { - background:url("/avatars/0ea8eca3dbf647cc9d1ac64551ca975c?size=180&default=alex&helm=true"); + background:url("/avatars/0ea8eca3dbf647cc9d1ac64551ca975c?size=160&default=alex&helm=true"); } .sideface.md_5 { - background:url("/avatars/af74a02d19cb445bb07f6866a861f783?size=180&default=alex"); + background:url("/avatars/af74a02d19cb445bb07f6866a861f783?size=160&default=alex"); } .sideface.md_5:hover { - background:url("/avatars/af74a02d19cb445bb07f6866a861f783?size=180&default=alex&helm=true"); + background:url("/avatars/af74a02d19cb445bb07f6866a861f783?size=160&default=alex&helm=true"); } \ No newline at end of file diff --git a/test/test.js b/test/test.js index 7c226f1..712196f 100644 --- a/test/test.js +++ b/test/test.js @@ -27,13 +27,13 @@ describe('Avatar Serving', function(){ }); describe('Avatar', function(){ it("should be downloaded", function(done) { - helpers.get_avatar(uuid, false, 180, function(err, status, image) { + helpers.get_avatar(uuid, false, 160, function(err, status, image) { assert.equal(status, 2); done(); }); }); it("should be local", function(done) { - helpers.get_avatar(uuid, false, 180, function(err, status, image) { + helpers.get_avatar(uuid, false, 160, function(err, status, image) { assert.equal(status, 1); done(); }); @@ -44,7 +44,7 @@ describe('Avatar Serving', function(){ cache.get_redis().flushall(); }); it("should be rate limited", function(done) { - helpers.get_avatar(uuid, false, 180, function(err, status, image) { + helpers.get_avatar(uuid, false, 160, function(err, status, image) { assert.equal(err, null); done(); }); diff --git a/views/index.jade b/views/index.jade index 0febd7f..b066ab9 100644 --- a/views/index.jade +++ b/views/index.jade @@ -23,7 +23,7 @@ block content h3 Parameters h4 size - p The size of the image in pixels, 1 - 512.
Default is 180. + p The size of the image in pixels, 1 - 512.
Default is 160. h4 default p The image to be returned when the uuid has no skin.
Valid options are a(href="/avatars/00000000000000000000000000000000?default=steve") steve @@ -41,7 +41,7 @@ block content p Either 'local' or 'downloaded'. Local means that Crafatar already had the image on disk, while downloaded means that it was retrieved from Mojang's skin servers. h3 Examples - p Get jeb_'s avatar, 180 × 180 pixels + p Get jeb_'s avatar, 160 × 160 pixels img(src="/avatars/853c80ef3c3749fdaa49938b674adae6") .well.code <img src="#{domain}/avatars/853c80ef3c3749fdaa49938b674adae6"> p Get jeb_'s avatar, 64 × 64 pixels