I installed and I thing setup the file system of my drupal site with no errors on it, except one thing, in my nodes when I insert a image with <img> tag that image don’t appear when the path of the image is some were in the folder like /files/images/image.gif only appear when the image placed on the root of site.
Please, any advice is welcome.

Comments

geodaniel’s picture

Does it work for external images? You may need to select a different input format (Full HTML) or add the img tag to your allowed list of tags, if it's not there already.

arttor’s picture

Yes I have edit the filter to allow the <img> tag and still nothing happen as well the external linked images refuses to show.

rvk’s picture

I think the problem is that you cannot simply translate locations in the file structure into drupal paths or locations of files. Drupal decides what you get to see when you ask for a specific URL and the same goes for files that are kept in folders.

You simply put an image into the files-directory (my guess), but that doesn't mean that drupal is now aware of the existence of it and it doesn't mean that drupal associates files/myimage.png with your image.

If you prefer your way of adding pics by hand and hardcoding links to them you have to create a folder somewhere which is accesible publicly and that is not the case for the files-folder apparently (though I'm sure that can be changed if you want to do it this way).

I think it might be better to install a module to extent drupal a bit such as the image module so that you do things in a cms-like way.

chickenmcnoggin’s picture

Yea you could install a module, but...

The method that you mention should work. That is exactly what the "module" would do.

Check out the first post that suggestion is probably more likely.

Brian

http://www.bpshoe.com

smelliott’s picture

Ok, I give. This post seems to be the closest to what I need to do. I need to display external images from a url stoerd in a field in a table. You would think this would be quite simple, but I belive Drupal is doing something to the code. I am building a module tothat displays infomation about some objects in a table;one of them is an image of it. I will include a snipit of my fuunction below, but when drupal displays it, all I get is the "alt" text. I can right mouseclick on the cell and view the image, but it will not show in the table. I viewed the source of the page, cut the text to a html file and can view it in my browser. When I hit refresh, I start to see the image, but then it goes to the alt test. Any ideas?

$header = array(array('data' => t('Title'),'field' => 'a.title','sort' => 'asc'),
array('data'=> t('Year'),'field' => 'a.year'),
array('data'=> t('image')));

$qry= "SELECT title, year, imgurl from a";
$find = array();

$result = pager_query($qry . tablesort_sql($header), 45, 0, NULL);
while ($account = db_fetch_object($result)) {
$find[] = array('Title' => $account->title, 'Year' => $account->year, 'image' => '

Only local images are allowed.imgurl . '" height="25" width="25" border="1"alt="test ">

');
}