diff --git a/inc/documents.php b/inc/documents.php
index 329d5caa20fb6156f3ae46e72a1c739c9cf63915..1eb27879cf4e792131e390a9571edacdf7b846a5 100644
--- a/inc/documents.php
+++ b/inc/documents.php
@@ -131,6 +131,7 @@ function vignette_automatique($img, $doc, $lien, $x = 0, $y = 0, $align = '', $c
 			$img = $f($e, false);
 			$size = @spip_getimagesize($img);
 			$img = "<img src='$img' " . $size[3] . ' />';
+			$class .= " spip_icone";
 		}
 	} else {
 		$size = @spip_getimagesize($img);
@@ -143,7 +144,7 @@ function vignette_automatique($img, $doc, $lien, $x = 0, $y = 0, $align = '', $c
 		$img = image_reduire($img, $x, $y);
 	}
 	$img = inserer_attribut($img, 'alt', '');
-	$img = inserer_attribut($img, 'class', $class);
+	$img = inserer_attribut($img, 'class', trim($class));
 	if ($align) {
 		$img = inserer_attribut($img, 'align', $align);
 	}
diff --git a/prive/style_prive_plugin_medias.html b/prive/style_prive_plugin_medias.html
index a1e3a96964fa3e0b186dfa85e351104f1a0044cd..11ca837398686747b7c06738c7e735f904712013 100644
--- a/prive/style_prive_plugin_medias.html
+++ b/prive/style_prive_plugin_medias.html
@@ -432,6 +432,11 @@ h3 .affichages {
 	height: auto;
 }
 
+.portfolios  .item .vignette img.spip_icone {
+	max-height:90px;
+}
+
+
 .portfolios .documents_cases .item .actions {
 	display:block;
 	width:100%;