I've installed core only. Can someone please give me the complete set of instuctions to make an image actually display? Preferably in a block in the middle of the front screen would be good. I've tried using html commands like "img src" - none of them work - but am not even sure where in Drupal I should put those commands.

As always I can find loads of useless partial info, but nothing that works.

I know html well, some php, and am an ex unix sysadmin. There just are no complete instructions out there

Many thanks.

Kurnal

Comments

WorldFallz’s picture

You can manually code an image into a block.

  1. navigate to admin/build/block
  2. click the "Add block" tab
  3. set the input format of the block to "full html" if the <img> tag is not one of the allowed tags in the filtered html input format (it's not by default)
  4. enter the html for the image:
    <img src="/path/to/your/image/image.jpg" />
    
  5. set the page visibility as desired
  6. click the "save block" button
  7. place the newly created block in one your template regions
kurnal’s picture

Thanks WorldFallz, you have given me the only Drupal instuctions to display an image that I can find on the entire web, but it doesn't work.

After your kind efforts I now have a new block on my front page, called photo, with no photo in it. This is what I did:

I uploaded an image called image.jpg to sites/default/files; then

1. navigate to Administer/Site building/block
2. click the "Add block" tab
3. set the input format of the block to "full html"
4. enter the html for the image:
<img src="image.jpg" />
5. set the page visibility as desired (If I do nothing would it still show?)
6. click the "save block" button
7. place the newly created block in one your template regions

There are no error messages, the html doesn't display. I can write as much text as I like and that displays, but I cannot get a picture to display anywhere or anyhow. And I've tried all over Drupal with methods like this. Any ideas?

WorldFallz’s picture

The path is not correct -- try:

<img src="/sites/default/files/image.jpg" /> 
WorldFallz’s picture

Also, as an aside, you'll definitely want to checkout the http://drupal.org/project/image, http://drupal.org/project/imagefield, & http://drupal.org/project/imagecache modules for any 'real' image handling with drupal.

kurnal’s picture

Thanks. You've done it.

<img src="http://image.gsfc.nasa.gov/image/image_launch_a5.jpg" /> works.
I can now display any image on the web, or any image on my own site, provided I prefix it with http://mysite.com and any full path.

I can't get it to work inside Drupal's filestructure at all.

<img src="sites/default/files/image.jpg" />
<img src="/sites/default/files/image.jpg" />
<img src="image.jpg" />  

just don't work. And I have copies of the image in all the relevant Drupal directories.

But thats OK.

Appreciate your help.

David.