Sourcefabric Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

Newscoop 4.1 Cookbook

Images: how, which and why

It's an understatement to say that images are crucial to news organizations. Because of their central role, Newscoop has a powerful and user-friendly media archive for storing, retrieving and reusing images in the administration interface. Newscoop's template language can access images in a number of different ways, and the output can be sent to web pages, to javascript slideshows or other channels. In this section, we'll look at how Newscoop templates work with images, image attributes and metadata.

In Newscoop, you are basically working with four kinds of images:

  • Renditions
    A rendition is a preset image size that comes with the theme. It has a specific name and can be called in the template by the rendition name.
  • Scaled in the template
    Each image can be manually scaled inside the template. The rendition method is preferred for performance and caching reasons. 
  • Author images
    The author manager allows to upload images as part of the author profile. These are stored separately and are not a property of the article. Neither are they set in renditions. 
  • Thumbnail
    Newscoop has a preset for thumbnails. It is better though to use renditions. 
  • From the media archive
    This is rarely used, but you can call images directly from the media archive. It is more common to call them in relation to an article where they are used. 
  • Static images
    This are outside the control of the templates, like the logo.png. You can transform them using CSS and Javascript.

According to the Newscoop template reference, "The image object is usually initialized inside a list of article images or a list of images. It is not initialized at the beginning of the template and cannot be initialized by other Newscoop functions." In other words, images must be used through lists or through articles.

You can make use of images through the article object, like when the current article has one or more images attached. One more place where you can use an image object is with author objects. We'll go into these options in detail later. What you can't do at this point is use an image object as a single isolated element, because it has to be set first by any of the means mentioned above.

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.