diff --git a/lib/private/avatar.php b/lib/private/avatar.php
index f20980c364b0290c1b98f218d2997156732389d2..720740569df21f5ad5318187ea1b74ea34e1874b 100644
--- a/lib/private/avatar.php
+++ b/lib/private/avatar.php
@@ -51,10 +51,6 @@ class OC_Avatar {
 	 * @return void
 	*/
 	public function set ($data) {
-		if (\OC_App::isEnabled('files_encryption')) {
-			$l = \OC_L10N::get('lib');
-			throw new \Exception($l->t("Custom profile pictures don't work with encryption yet"));
-		}
 
 		$img = new OC_Image($data);
 		$type = substr($img->mimeType(), -3);
diff --git a/tests/lib/avatar.php b/tests/lib/avatar.php
index 1c5195f8eb1952d6174c8c7c04770509ee0cbfb0..6e6faed2d2c664f986733d982368ba56f39dcea1 100644
--- a/tests/lib/avatar.php
+++ b/tests/lib/avatar.php
@@ -9,15 +9,14 @@
 class Test_Avatar extends PHPUnit_Framework_TestCase {
 
 	public function testAvatar() {
-		$this->markTestSkipped("Setting custom avatars with encryption doesn't work yet");
 
 		$avatar = new \OC_Avatar(\OC_User::getUser());
 
 		$this->assertEquals(false, $avatar->get());
 
 		$expected = new OC_Image(\OC::$SERVERROOT.'/tests/data/testavatar.png');
-		$avatar->set($expected->data());
 		$expected->resize(64);
+		$avatar->set($expected->data());
 		$this->assertEquals($expected->data(), $avatar->get()->data());
 
 		$avatar->remove();