hi

Can anyone please tell me a simple way of adding an image into content such as a page or story. I have the image module installed and the image assistant and still have no joy!

I know from previous posts that it seems that image assistant is not working properly,so is there another way of doing it? what code do I need to use?

Thanks

Comments

lreid’s picture

I just installed it yesterday and it works fine. Are you using a rich text editor or just plain text input? How far do you get when you use it? Do you not see the add image button below the text window at all?

Did you remember after installing and activating the module to go to administer/input format and configure the Full html format to allow inline images? Do you remember to use Full html as the input format on the node you are creating?

Did you remember to go to access control and give your role permission to access image_assist?

In using drupal as an amateur I've wasted inordinate amounts of time not getting steps like that right and thinking things didn't work!

The steps are different and more complex if you're using TinyMCE, but the instructions are all there in the install.txt.

Tanya S’s picture

Thanks for your advice.

I shall check all those steps and get back to you. I have only just started using drupal and all this is very new to me!

Muslim guy’s picture

If image.module is installed, you should be able to upload and display images

The usual URL for the image is

http://domain.com/files/yourimage.jpg

Then you can use HTML code from anywhere in the world to display that image

<img src="
http://domain.com/files/yourimage.jpg" title="Land on the moon" alt="Land on the moon">

*The HTML tags are always handy in case modules dont work, for example if you have a Video or Audio and they wont install properly and you want to display them badly

howfin’s picture

I'm having the same problem with 4.7.3 which I installed a couple of days ago. My thumbnails and images don't show but the files are in the files/images folder and their paths are correct (as are the paths in the database).

On problem solving I found that I can manually place photos in a submission as long as the pathname is NOT in the files directory!!! If it is lying about in the root folder ist's ok too but as soon as it's in the files or down in the images folder it won't show. There's no error message either. I've looked throughthe forums, checked that GD2 is on my web host's install etc. The only thing is the permissions: I own the files folder but not the images folder as it was created by drupal. If there was a problem with permissions however I'd expect some sort of error.

I'mm totally confused and exasperated!! I'm new to this malarky and I'm fraught as I like the package otherwise and want to support opensource products.

Tanya S’s picture

Howfin - I am completely exasperated too! What do you mean by:
“I can manually place photos in a submission as long as the pathname is NOT in the files directory!!”

I too still can't get images into my site! I never thought such a simple thing would prove so difficult. I have deleted image assistant all together and am just trying to use html code as per 'Muslim guys' post. I have a separate folder for my images which is called 'images', this is under the public_html folder, therefore I am typing in:

Only local images are allowed.

Its still not working.

On some occasion when I try it one of those white boxes with a red cross in the corner come up, sometimes nothing happens at all.

Please help!

Tanya S’s picture

Only local images are allowed.

Tanya S’s picture

<img src="http://mydomainname.org/files/images/myimage.jpg" title="myimage title" alt - "myimage alt">

howfin’s picture

I just put in something like

<p>
<img src="http://www.my_site/images/dog.jpg" />
</p>

where this is a link to a picture "dog.jpg" say I know exists. When I move the picture to the drupal 'files' folder then make the path point to the new placement again I get the missing picture icon. Puzzling. The picture (and the thumbnail) are there as i can see them when I use a FTP utility to look at my site directories.

Tanya S’s picture

When I type that in I just get ?>, no image, even though yeah I know the image exists in the files because I can see it in the ftp client!

Anyone else help? Is there any settings that I've missed?

howfin’s picture

The php tags shouldn't be there in my code as I put them in so the code would show up!

Did you try displaying a file from another directory (ie not the files/images of Drupal)? Was it just the same?

If not, put a file in Drupal's root diectory (outwith the files directory) and see if you can pick it up. I can and that's what confusing me.

Also are you being hosted or running it from localhost?

Howie

Tanya S’s picture

Nah, none of it works for me! I tried putting in

 <p>
<img src="http://www.mysite.org/root/mypicture.jpg"/>
</p> 

but no still not working!

I'm hosted by simplybehosted.com

This is ridiculous! All I want is an image!

lreid’s picture

Have you done the following?

Below the window where you enter the text, it says "Input format". Click on that and select full HTML.

Otherwise drupal filters out the code.

Muslim guy’s picture

Yep, you might have forget tow things:

1. Input format must be Full HTML

2. The correct path to image

If the drupal installed in the main folder you can just enter img src="files/images/888.jpg" for images uploaded by image.module

howfin’s picture

I've done both those things. As I've said i've changed the location of the file many times. I can display it as long as the path doesn't involve the files folder. I own the files folder (as I laced it there myself) but don't own the images folder and its subdirectories. Could it be something to do with permissions??

Tanya S’s picture

Howfin - have you tried using the files path for putting an image on a front page? because that works for me.

However, I couldn't add the exact same image, using the same method to a page or story. I just get the white box with a red cross in it. The error says that the image was not found, but the image was found for the front page!

All settings are correct, ie input format: full HTMl, enable user to attach images etc
?

howfin’s picture

Can't add content on a consistent basis. I installed the eCommerce module and keep getting problems when I try to add content. Sometimes it works, sometimes it ends in an error. Bummer!

I'll try again tomorrow!

sepeck’s picture

You can access image module images in a different way
http://drupal.org/node/47357

With clean urls

<img src="http://www.example.org/image/view/##/preview" />
<img src="http://www.example.org/image/view/##/thumbnail" />

Substitute preview or thumbnail with whatever other size you named in image module.

I think with img_assist you need to turn on a filter in admin >> input formats but don't remember. On on esite I switched img_assist to use HTML tags. Then added the IMG tag to the allowed input format for Filtered HTML.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

Tanya S’s picture

Hi all

I have managed to do it! I'm not sure if there was a delay or something but when I checked my site a few hours later the images were there. The images were added via the files path and the code I put in was:

<img src="http://mysite.org/files/images/myimage.jpg" >

Howfin - I've no idea why yours isn't working, hope you sort it out soon.

Thanks for everyones advice.