I have a small jpeg image that I want to display in a panel.

I created a panel with the layout I desired but I am confused as how can I display an image inside one of the columns of the panel.

I tried adding a new custom content in which it presents a html text area. But not sure how would I add the correct url without hard coding the entire path (i.e: the host and sub directory etc).

Please enlighten me :)

  • if you want the content you should provide entire path (i.e: the host, sub directory, etc, etc..).
    – niksmac
    Commented May 13, 2014 at 5:15

6 Answers 6


You can use custom content option in panel to add HTML...

Step 1 : Click on Add Content

enter image description here

Step 2 : Click on New Custom Content

enter image description here

Step 3 : Add HTML and select filter as Custom HTML

enter image description here

Step 4 : Save Changes

  • I already mentioned that i tried this. But i am having to hard code the Full (Absolute) URL to the image this way.. That is something i like to avoid, because currently i am testing on localhost and i would have to remember to change this every time i deploy this online. Is there no other (better) way to do this in drupal?
    – Zubair1
    Commented May 8, 2014 at 5:50
  • You don't need to add full url of the image. For this you have to provide the relative path so its work everywher same. Give path as : <img src="sites/default/files/image_name.ext" /> Commented Aug 14, 2015 at 18:34

You can insert any kind of content within panels using fieldable panels panes module. It can be used to create custom fieldable entities which can be dropped inside panels. For example usage, check the Panopoly distribution.


Make a page-panel for localhost and add your content in the panel

Make a variant on the panel for Live and add your content in the panel.

Make use of a selection rule (e.g. php with string localhost) for selection the correct variant.


I had similar requirement but in addition to add an image, I needed an Image Link.

  1. After having the entire Panel working, I installed Fieldable Panels Panes and Link Image Field modules.

  2. Then I access the Fieldable Panels Panes configuration, choose the option Panels Pane and add an Image Link field.

  3. Go to Panels Page and pick up the page that you want to add the Image or Image Link.

  4. Access the Content Page tab and Add a content region. Choose the Fieldable Pane and add your image.

Hope this help.


make a contentype called 'image', add an image field to contentype, add a node type 'image', upload your image to your node, add a view displaying content and displaying fields, add your image field, filter by contenttype 'image' your node (only the image) will appear in the view, add the view in your panel. This way you can show your image in other panels also.


To add a single static image, you have to add a Custom Content Pane and using the img tag and provide the path of the image.

There is no need to add the absolute path of the image. You can give the path of the image as :

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

I hope this will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.