diff --git a/ecrire/inc/filtres.php b/ecrire/inc/filtres.php
index 8205df49311f5e87dc3bdb9ceae5b50eb7e7db3b..23ad2a5461c180d09a9cd9b47377d2690283453b 100644
--- a/ecrire/inc/filtres.php
+++ b/ecrire/inc/filtres.php
@@ -504,7 +504,7 @@ function image_filtrer($args) {
 			return file_exists($path);
 		};
 		if ($is_local_file($is_file) || tester_url_absolue($is_file)) {
-			$res = $filtre("<img src='$is_file'>", ...$args);
+			$res = $filtre("<img src='" . attribut_url($is_file) . "'>", ...$args);
 			statut_effacer_images_temporaires(false); // desactiver pour les appels hors compilo
 			return $res;
 		}
@@ -3453,7 +3453,7 @@ function http_img_pack($img, $alt, $atts = '', $title = '', $options = []) {
 	else {
 		$alt = " alt='" . attribut_html($title) . "'";
 	}
-	return "<img src='" . attribut_html($img_file) . "'$alt"
+	return "<img src='" . attribut_url($img_file) . "'$alt"
 	. ($title ? ' title="' . attribut_html($title) . '"' : '')
 	. ' ' . ltrim($atts)
 	. '>';
diff --git a/ecrire/inc/math.php b/ecrire/inc/math.php
index d255c65480260559d777cb96ec3a54aaaf390a06..ad7081a903dd001969a8300e399b1618a7b6e73d 100644
--- a/ecrire/inc/math.php
+++ b/ecrire/inc/math.php
@@ -63,7 +63,7 @@ function produire_image_math($tex) {
 			[, , , $size] = @spip_getimagesize($fichier);
 			$alt = "alt=\"$tex\" title=\"$tex\"";
 
-			return "<img src=\"$fichier\" style=\"vertical-align:middle;\" $size $alt />";
+			return "<img src=\"" . attribut_url($fichier) . "\" style=\"vertical-align:middle;\" $size $alt />";
 		}
 	} else // pas de fichier
 	{
diff --git a/ecrire/inc/presenter_enfants.php b/ecrire/inc/presenter_enfants.php
index 599548e092397fdc42d6cde5b8475ee6f32f1906..b685ab35af80fc24fa1251610a4331e4ed8bc977 100644
--- a/ecrire/inc/presenter_enfants.php
+++ b/ecrire/inc/presenter_enfants.php
@@ -65,7 +65,7 @@ function enfant_rub($collection, $debut = 0, $limite = 500) {
 
 			if ($voir_logo && ($logo = $chercher_logo($id_rubrique, 'id_rubrique', 'on'))) {
 				[$fid, $dir, $nom, $format] = $logo;
-				$logo = image_recadre_avec_fallback("<img src='$fid' alt=''>", 70, 70);
+				$logo = image_recadre_avec_fallback("<img src='" . attribut_url($fid) . "' alt=''>", 70, 70);
 				if ($logo) {
 					$logo = wrap(inserer_attribut($logo, 'class', 'logo'), '<span class="logo-carre">');
 				}