Let images work properly online and offline (MAMP) I just started using MAMP to work offline on my drupal-projects.

Because MAMP and working offline is new to me I started today with a test-website.

I installed MAMP, no problems.

I installed a new drupal 7.30 offline in MAMP, no problems.
I imported the CKEDITOR and IMCE for uploading images, no problems.

I created two test-pages and imported in each page a image using CKEDITOR &amp; IMCE, no problems.

After that i tried to upload my offline website online: backup DB, create a new DB online, imported the offline DB, FTP my files online, change the settings-file for connecting instructions DB.

After all those steps my website was showing up online and i could login. Everything seems to work fine.

But then when i clicked one of the testpages, i saw that my images where not showing up...

When i checked the sourcecode i saw something like this:



When i removed /sweetmorning, and saved that code, the image was showing up again.

What is the best practice to still work with CKEDITOR IMCE and let the images showup offline and also after i put the website online.

Any tips, links, info are welcome :-)

Thanks in advance,
Kristof
Part of your code did not go through; however I believe it's pretty clear that the issue is in image paths.

Check out Pathologic module, as it deals with exactly such issues:


  Pathologic is an input filter which can correct paths in links and images in your Drupal content in situations which would otherwise cause them to “break;” for example, if the URL of the site changes, or the content was moved to a different server. Pathologic can also solve the problem of missing images and broken links in your site’s RSS feeds. See more example use cases on the documentation page.