diff --git a/CHANGELOG.md b/CHANGELOG.md
index ff3d1789eb672937a24921f3e0254ad39656fe9d..b5b75ca66fef60aa272c760cb06ecb6c2c0a4cc2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,7 @@
 
 ### Fixed
 
+- #4907 Réparer l'usage de `#LOGO_DOCUMENT{align}`
 - #4905 Utiliser une déclaration moins prioritaire pour ajouter le traitement typo sur le champ `#CREDITS`
 - spip/spip#5274 Homogénéiser les labels des listes
 - #4902 Suppression des boutons excédentaires de sens de tri sur certaines listes de documents
diff --git a/inc/documents.php b/inc/documents.php
index 00df869a72e506f2c2d43d7be20c3db95fadb2a8..f77d5dbfdcf55c18b9ee12b2e3ba6643fa291164 100644
--- a/inc/documents.php
+++ b/inc/documents.php
@@ -142,10 +142,10 @@ 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', trim($class));
 	if ($align) {
-		$img = inserer_attribut($img, 'align', $align);
+		$class .= " spip_logo_$align";
 	}
+	$img = inserer_attribut($img, 'class', trim($class));
 
 	if (!$lien) {
 		return $img;