Posted by sidsali on January 27, 2013 at 4:45pm
I have developped my first drupal site on a local wamp server.
Now I copy the content to my provider but my images are not visible. This is probably because they have an absolute path description. Is this normal or have I done something wrong?
Do I have to edit all these paths now?
Today my website is on a testlocation of my provider. So, if I update the paths, then I will have to redo this once I put the website public.
website: www.ludoviek.be/_NEW/site
thanks for feedback!
Lieven
Comments
Drupal is pretty good at
Drupal is pretty good at being portable. You probably just need to clear your cache at configure > performance.
no, clearing the cache does
no, clearing the cache does not solve the problem
Actually, when I look in the content of my pages, I see the absolute path to my initial local website directories.
I just want to be sure that
I just want to be sure that you understand that I am talking about Drupal Cache and not browser cache. Drupal builds that absolute URL on the fly, so it is not stored in the database except as cache.
If that still does not work, look in your setings.php file in sites/default/settings.php around line 157 you should see the assignment of the global variable $base_url. It should be commented out. Uncomment it and set it to your current base path.
---
In this type of situation where you have to use hard coded images it's best to use a
$base_urlvariable. This way you only have to change the base_url in one location and not everywhere you've incorporated a hard coded image.setting the base_url solved the problem !
thanks folks,
I changed the links for my images to relative paths (e.g. src="sites/default/files/Galeries/image.JPG" )
and set the $base_url in the settings.php file
When I switch my website to the target destination, I only have to change the base_url variable
great!