some images not displaying after migrating to local host I copied a website from the server to local environment and after seeing that everything is displayed I noticed that the images in all blog posts are not being displayed. I googled this problem and found that a lot of people had it before me and tried applying their ways to solve the problem but none of them were successful for me. I think I am missing something. Please correct me if there is something I might have missed. 
Here's a list of things I have done


Compared the image paths and both are the same src="/sites/default/files/image.jpg"
Checked the .htaccess file in sites/default/files and no differences there too
Cleaned the cache


It is not a multisite and it is drupal ver 7.31
The reason you are having the problem is because you have your website on localhost/folders. And you Drupal installation expects your website to be in locahost. So there is to easy ways to solve this problem. Either you move everything up directory and all your files are in the localhost. 

cd /Applications/MAMP/htdocs/testwebsite # Move to the website folder directory.
sudo mv * .[^.]* .. # Move everything up one directory.
cd .. # Move to localhost directory.
sudo rm -rf testwebsite     # Remove testwebsite directory.


Or you can created a temporary soft link on your localhost so your Drupal installation can find the sites folder on the localhost.

cd /Applications/MAMP/htdocs/ # Move to the webserver directory.
sudo ln -s testwebsite/sites sites/ # This is going to created the soft link .