Index: _source/plugins/image/dialogs/image.js
===================================================================
--- _source/plugins/image/dialogs/image.js	(revision 4463)
+++ _source/plugins/image/dialogs/image.js	Fri Dec 11 00:11:34 CST 2009
@@ -145,6 +145,8 @@
 
 	var imageDialog = function( editor, dialogType )
 	{
+		var previewPreloader;
+
 		var onImgLoadEvent = function()
 		{
 			// Image is ready.
@@ -358,6 +360,7 @@
 				var doc = this._.element.getDocument();
 				this.addFocusable( doc.getById( 'btnResetSize' ), 5 );
 				this.addFocusable( doc.getById( 'btnLockSizes' ), 5 );
+				previewPreloader = new CKEDITOR.dom.element( 'img', editor.document )
 			},
 			onHide : function()
 			{
@@ -422,8 +425,9 @@
 													original.on( 'error', onImgLoadErrorEvent, dialog );
 													original.on( 'abort', onImgLoadErrorEvent, dialog );
 													original.setAttribute( 'src', newUrl );
-													dialog.preview.setAttribute( 'src', newUrl );
-
+													// Query the preloader to figure out the url impacted by based href.
+													previewPreloader.setAttribute( 'src', newUrl );
+													dialog.preview.setAttribute( 'src', previewPreloader.$.src );
 													updatePreview( dialog );
 												}
 												// Dont show preview if no URL given.
Index: _source/plugins/flash/dialogs/flash.js
===================================================================
--- _source/plugins/flash/dialogs/flash.js	(revision 4581)
+++ _source/plugins/flash/dialogs/flash.js	Fri Dec 11 00:33:58 CST 2009
@@ -173,7 +173,8 @@
 		var makeObjectTag = !editor.config.flashEmbedTagOnly,
 			makeEmbedTag = editor.config.flashAddEmbedTag || editor.config.flashEmbedTagOnly;
 
-		var previewAreaHtml = '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.image.preview ) +'<br>' +
+		var previewPreloader,
+			previewAreaHtml = '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.image.preview ) +'<br>' +
 			'<div id="FlashPreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div>' +
 			'<div id="FlashPreviewBox"></div></div>';
 
@@ -279,6 +280,11 @@
 					editor.insertElement( newFakeImage );
 			},
 
+			onLoad : function ()
+			{
+				previewPreloader = new CKEDITOR.dom.element( 'img', editor.document )
+			},
+
 			onHide : function()
 			{
 				if ( this.preview )
@@ -318,9 +324,10 @@
 											{
 												var dialog = this.getDialog(),
 												updatePreview = function( src ){
-
+													// Query the preloader to figure out the url impacted by based href.
+													previewPreloader.setAttribute( 'src', src );
 													dialog.preview.setHtml( '<embed height="100%" width="100%" src="'
-														+ CKEDITOR.tools.htmlEncode( src )
+														+ CKEDITOR.tools.htmlEncode( previewPreloader.$.src )
 														+ '" type="application/x-shockwave-flash"></embed>' );
 												};
 												// Preview element

