diff --git a/ecrire/inc/filtres_images.php b/ecrire/inc/filtres_images.php
index 557a457b9f0b508e949d09f326a0b1a6835b01c8..37f9d3e65cb63c765da29d4c3bc3c8e68cd4b6d0 100644
--- a/ecrire/inc/filtres_images.php
+++ b/ecrire/inc/filtres_images.php
@@ -880,15 +880,29 @@ function image_recadre($im,$width,$height,$position='center', $background_color=
 	$offset_width = $x_i-$width;
 	$offset_height = $y_i-$height;
 	$position=strtolower($position);
-	if (strpos($position,'left')!==FALSE)
-		$offset_width=0;
+	if (strpos($position,'left')!==FALSE){
+		if (preg_match(';left=(\d{1}\d+);', $position, $left)){
+			$offset_width=$left[1];	
+			spip_log($offset_width,"photospip");
+		}
+		else{
+			$offset_width=0;
+		}
+	}
 	elseif (strpos($position,'right')!==FALSE)
 		$offset_width=$offset_width;
 	else
 		$offset_width=intval(ceil($offset_width/2));
 
-	if (strpos($position,'top')!==FALSE)
-		$offset_height=0;
+	if (strpos($position,'top')!==FALSE){
+		if (preg_match(';top=(\d{1}\d+);', $position, $top)){
+			$offset_height=$top[1];
+			spip_log($offset_height,"photospip");
+		}
+		else{
+			$offset_height=0;
+		}
+	}
 	elseif (strpos($position,'bottom')!==FALSE)
 		$offset_height=$offset_height;
 	else