I’ve seen this topic a few times on the forums, but can’t seem to find a definitive answer- I’m using TinyMCE with the LG TinyMCE extension, and have the MC FileManager and MC ImageManager plugins added. All shows up fine, but when I go through the image button to upload and add an image to my WSYIWYG field, the image path includes the template path so it doesn’t render the image correctly.
For example…I used the ImageManager to upload an image file to my images/uploads directory, but the img src string points to the URL of the current page, then adds the path to the image. I’m building the site in a ‘draft directory, so the output for the image (which doesn’t display, this is from viewing properties) is:

Where should I be looking to change the settings for this, in the ImageManager config file, or is this something in the LG TinyMCE settings?
The only change I’ve made to the default ImageManager config file is to the filesystem lines, and it puts my uploaded images right where I want them:
$mcImageManagerConfig['filesystem.path'] = '../../../../../../images/uploads/'; // absolute or relative from this script path, optional.
$mcImageManagerConfig['filesystem.rootpath'] = '../../../../../../images/uploads/'; // absolute or relative from this script path, required.My LG TinyMCE settings regarding URLs look like this:
relative_urls: 'true',
remove_script_host : 'true',
document_base_url : 'http://www.mydomain.org/',Since the ImageManager is putting my images where I want them, I’m guessing I need to make a change somewhere on the TinyMCE side of things, but I can’t figure out where that would be. Any help would be MUCH appreciated…spending a lot of much-needed time on this :(
Quick update… I noticed my FileManager uploads were linking incorrectly, too, so I went in and fixed my TinyMCE settings to REMOVE the document_base_url, and my uploaded document files are now displaying correctly.
BUT…I realized that the uploaded images are on subpages of my site, not the main navigation pages- and my subpages are being generated using weblogs, so that my client can dynamically add subpages to the top-level navigation. I think the file path on the image file is being pulled from that weblog URL - so how would I fix this?
I may need to re-post this to How To…
I’ve had similar problems in the past. Although I can’t remember exactly why, or how I found these settings, these are the ones that work for me.
// URL
relative_urls : false,
remove_script_host : true,
document_base_url : "/",
convert_urls : true,For the ImageManager config I’ve only changed
$mcImageManagerConfig['general.remember_last_path'] = true;$mcImageManagerConfig['filesystem.path'] = ''; // absolute or relative from this script path, optional.
$mcImageManagerConfig['filesystem.rootpath'] = '../../../../../images/content'; // absolute or relative from this script path, required.I don’t use the upload facility, I pull the images from the Photogallery module locations, but as you say, if the images are being placed in the correct location I doubt this will be the issue.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.