Adding content with images - basic
Last modified: September 19, 2007 - 07:15
With Drupal you can add images to your content. How it is
displayed still depends on the theme you are using and the CSS included
handles the IMG tag.
- Enable upload module
- Set your role as allowed to upload files
- Check your space and attachment settings administer > site configuration > file uploads
- Enable your content type for uploads
- Create content
- Attach file - uncheck List file, copy the file path under the box once it's uploaded.
Now you can use <img src="path/image.png" /> in the content area.
Note
Assumes your filter allows the use of <img>

Expanding on point (6)
Expanding on point (6)
Image paths in the content
When you copy the path of the uploaded file into the content to place the image, the correct way to specify "img src=" depends on your site's setup. Assuming that "filepath" is your Drupal images directory:
a) If you are using Clean URLs, then specify an absolute domain-independent path:
- When a site is accessed as http://example.com then use "/filepath/image.png".
- When a site is accessed as http://example.com/drupalsite then use "/drupalsite/filepath/image.png".
b) If you are not using Clean URLs, then (a) is still OK, but you have a simpler alternative: You can always specify only a relative path, for example "filepath/image.png" (without a front slash), no matter whether the site is accessed as a subdirectory or not.
Obviously a fully qualified URL for an image ("http://example.com/filepath/image.png") will always work as long as your site's domain remains the same.
Note: When switching between "Clean URLs" and "no Clean URLs" or when changing a site's URL path, image links may break if you don't take into account these differences.
There wasn't anything about
There wasn't anything about filters before this statement "Assumes your filter allows the use of ".
I have been looking for a place to edit my filter since when I tried to insert image, the picture didn't show.
If it is a filter problem,
If it is a filter problem, you could create your content using the Full HTML input format, but if you let other users use it there are security concerns.
Or, you can go to the admin/settings/filters page and "configure" the Filtered HTML input format. Among other filters, it has enabled the "HTML filter". Go to the "Configure" tab, and you can add
<img>to its allowed HTML tags.