Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By pbolduc on
How do I include a simple image on my content pages?
I am converting to drupal and simply want to in an image on my content pages such as "About Us".
I have placed the images in the image folder of my theme and have set the format to full html and am using the html image tag . However, when the page views all the text is there, but no image.
On my current static site I am using a random image javascript to accomplish this and while the random image is my preference, I'll be content to simply pull in a single image.
Any help would greatly be appreciated.
thanks
pete
Comments
hmmm
Using Firefox:
right click on the image placeholder and click "view image". Look at the url and see if it is right. It will probably say "http://yoursitename.com/node/number/images/image.jpg" in the address bar. To fix this, add the following to your page.tpl.php page in the head section.
No Placeholder shown
When the page views there is not indication of an image at all.
Thank you for your prompt response
pete
Has it ever occured to you that nothing has ever occured to God!
It worked!!!
I placed the suggested code in the head tag and it worked.
I was also able to get the random image to work by placing the following php random image code in the image folder and linking to it as suggested in the comment section of the code below.
Thanks so much for your help... hope this helps others
pete
Has it ever occured to you that nothing has ever occured to God!