User login

Add an image to a block

Searched words: 
embed image in text block content sidebar blocks graphic in context attach picture to block box

How do we add an image to a custom defined, textual block?

You can change menus here:

Edit the custom block in question, at a URL like:

http://example.com/admin/build/block/configure/block/41

Add the image using Create Content -> Image and upload it from your file system. As we are using a public file system, left it unpublished and not in any photo galleries. Copied the path "Copy Image Location" on left (or control) click in Firefox.

A graphic can also be attached to a page or any content as a file, and not listed but accessible (for public download) if available.

Then use the path in the block content (you may need to set the input format to full HTML), in a standard <img src="/sites/default/files/images/agaric_image.jpg" />.

Resolution

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.