Index: includes/filerepo/File.php
===================================================================
--- includes/filerepo/File.php	(revision 53396)
+++ includes/filerepo/File.php	(working copy)
@@ -530,6 +530,7 @@
 	 */
 	function transform( $params, $flags = 0 ) {
 		global $wgUseSquid, $wgIgnoreImageErrors;
+		$params["descriptionUrl"] = $this->getDescriptionUrl();
 
 		wfProfileIn( __METHOD__ );
 		do {
Index: includes/media/Bitmap.php
===================================================================
--- includes/media/Bitmap.php	(revision 53396)
+++ includes/media/Bitmap.php	(working copy)
@@ -53,6 +53,7 @@
 		$physicalHeight = $params['physicalHeight'];
 		$clientWidth = $params['width'];
 		$clientHeight = $params['height'];
+		$descriptionUrl = $params['descriptionUrl'];
 		$srcWidth = $image->getWidth();
 		$srcHeight = $image->getHeight();
 		$mimeType = $image->getMimeType();
@@ -147,6 +148,7 @@
 				// or ImageMagick may decide your ratio is wrong and slice off
 				// a pixel.
 				" -thumbnail " . wfEscapeShellArg( "{$physicalWidth}x{$physicalHeight}!" ) .
+				" -set comment " . wfEscapeShellArg( "{$descriptionUrl}" ) .
 				" -depth 8 $sharpen " .
 				wfEscapeShellArg($dstPath) . " 2>&1";
 			wfDebug( __METHOD__.": running ImageMagick: $cmd\n");
