diff --git a/config/config.sample.php b/config/config.sample.php
index 5f748438bc7ab605623ad85c70a171255a48b437..a9ce48a4e9d32b60457ba0abf53a368425bdb09a 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -214,4 +214,7 @@ $CONFIG = array(
 'preview_libreoffice_path' => '/usr/bin/libreoffice',
 /* cl parameters for libreoffice / openoffice */
 'preview_office_cl_parameters' => '',
+
+/* whether avatars should be enabled */
+'enable_avatars' => true,
 );
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index c67df07bd41312a790e8cf2a5c76e046b344e38c..3a46680c3fc48834fc6d010189dcb8be91afcfd7 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -46,7 +46,9 @@
 				src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="<?php p($theme->getName()); ?>" /></a>
 			<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
 
+			<?php if (\OC_Config::getValue('enable_avatars', true) === true): ?>
 			<div class="avatardiv"></div>
+			<?php endif; ?>
 
 			<ul id="settings" class="svg">
 				<span id="expand" tabindex="0" role="link">
diff --git a/lib/base.php b/lib/base.php
index 9f16edd14f51b208f462b1408adc6232dbbed725..b66e58f54b4ee2433d41795b3c9c1bcc36acfaed 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -266,11 +266,13 @@ class OC {
 		OC_Util::addScript('router');
 		OC_Util::addScript("oc-requesttoken");
 
-		// defaultavatars
-		\OC_Util::addScript('placeholder');
-		\OC_Util::addScript('3rdparty', 'md5/md5.min');
-		\OC_Util::addScript('jquery.avatar');
-		\OC_Util::addScript('avatar');
+		// avatars
+		if (\OC_Config::getValue('enable_avatars', true) === true) {
+			\OC_Util::addScript('placeholder');
+			\OC_Util::addScript('3rdparty', 'md5/md5.min');
+			\OC_Util::addScript('jquery.avatar');
+			\OC_Util::addScript('avatar');
+		}
 
 		OC_Util::addStyle("styles");
 		OC_Util::addStyle("apps");
diff --git a/settings/personal.php b/settings/personal.php
index 6a6619d5a145264337e2066967c52d323ef2296e..88e8802663d8ac0b62ad166c523251e98fb5937c 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -16,8 +16,10 @@ OC_Util::addStyle( 'settings', 'settings' );
 OC_Util::addScript( '3rdparty', 'chosen/chosen.jquery.min' );
 OC_Util::addStyle( '3rdparty', 'chosen' );
 \OC_Util::addScript('files', 'jquery.fileupload');
-\OC_Util::addScript('3rdparty/Jcrop', 'jquery.Jcrop.min');
-\OC_Util::addStyle('3rdparty/Jcrop', 'jquery.Jcrop.min');
+if (\OC_Config::getValue('enable_avatars', true) === true) {
+	\OC_Util::addScript('3rdparty/Jcrop', 'jquery.Jcrop.min');
+	\OC_Util::addStyle('3rdparty/Jcrop', 'jquery.Jcrop.min');
+}
 OC_App::setActiveNavigationEntry( 'personal' );
 
 $storageInfo=OC_Helper::getStorageInfo('/');
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index c488623a08814486ea1cb462d9de0f1591068856..d4a0e3b9480dd698e1b399828df15b00c4fad82b 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -80,6 +80,7 @@ if($_['passwordChangeSupported']) {
 }
 ?>
 
+<?php if (\OC_Config::getValue('enable_avatars', true) === true): ?>
 <form id="avatar" method="post" action="<?php p(\OC_Helper::linkToRoute('core_avatar_post')); ?>">
 	<fieldset class="personalblock">
 		<legend><strong><?php p($l->t('Profile Image')); ?></strong></legend>
@@ -92,6 +93,7 @@ if($_['passwordChangeSupported']) {
 		<div class="inlineblock button" id="removeavatar"><?php p($l->t('Remove image')); ?></div>
 	</fieldset>
 </form>
+<?php endif; ?>
 
 <form>
 	<fieldset class="personalblock">
diff --git a/settings/templates/users.php b/settings/templates/users.php
index 2fe0b83cf3357b8ee58b8d53e86d4173e0870194..445e5ce2fd50ee5aa0b8691bedcdb5f317b84a49 100644
--- a/settings/templates/users.php
+++ b/settings/templates/users.php
@@ -81,7 +81,9 @@ $_['subadmingroups'] = array_flip($items);
 <table class="hascontrols" data-groups="<?php p(json_encode($allGroups));?>">
 	<thead>
 		<tr>
+			<?php if (\OC_Config::getValue('enable_avatars', true) === true): ?>
 			<th id='headerAvatar'></th>
+			<?php endif; ?>
 			<th id='headerName'><?php p($l->t('Username'))?></th>
 			<th id="headerDisplayName"><?php p($l->t( 'Display Name' )); ?></th>
 			<th id="headerPassword"><?php p($l->t( 'Password' )); ?></th>
@@ -97,7 +99,9 @@ $_['subadmingroups'] = array_flip($items);
 		<?php foreach($_["users"] as $user): ?>
 		<tr data-uid="<?php p($user["name"]) ?>"
 			data-displayName="<?php p($user["displayName"]) ?>">
+			<?php if (\OC_Config::getValue('enable_avatars', true) === true): ?>
 			<td class="avatar"><div class="avatardiv"></div></td>
+			<?php endif; ?>
 			<td class="name"><?php p($user["name"]); ?></td>
 			<td class="displayName"><span><?php p($user["displayName"]); ?></span> <img class="svg action"
 				src="<?php p(image_path('core', 'actions/rename.svg'))?>"