April 22, 2015 by Patrick Altman / Technical

Using Images in pinax-blog Posts

In pinax-blog (previously named biblion), there are extensions to the markup libraries that make including images simple and easy.

The pinax-blog app provides a simple interface for creating and editing posts in the Django admin. You can choose between creole or markdown markup languages out of the box, or as a site developer, provide your own in addition to these.

Since it is plain-text markup that you author with, adding images is a two-step process. First you need to upload images in the inline section below the main post section:

Images Inline Section

After selecting your image or images, click the "Save and Continue Editing" button to upload the images. This will upload them to the server as well as create database entries for them. You will now see numbers above them in the inline:

Uploaded Image

Now you can use that number to insert images into your post by adding the following markup depending on your markup selection:

# Markdown
![Alt Text](Image Number)

# Creole
{{ Image Number }}

For example, the image above had an image number of 29 and the post is authored in markdown:

![Uploaded Image](29)

If you don't want any alt text you can simply leave it blank:

![](29)

That's all there is to it!

Eldarion Named One of Boston’s Leading Web Development Firms Eldarion Partners with Jumpstart Foundry

Want to talk with us about something more custom or have questions?

Get in touch with us