-my $libravatar_available = 0;
-
-eval 'use Libravatar::URL';
-if (! $@) {
- $libravatar_available = 1;
+my $libravatar_enabled = 0;
+if ( C4::Context->preference('ShowReviewer') and C4::Context->preference('ShowReviewerPhoto')) {
+ eval {
+ require Libravatar::URL;
+ Libravatar::URL->import();
+ };
+ if ( !$@ ) {
+ $libravatar_enabled = 1;
+ }