Skip to main content
Documentation & User Guides | Fotoware

Preview Lists representation

Overview

This article describes the JSON representation of preview lists, which list available preview images and their attributes.

Usage

Part of ...

Example

[
  {
    size: 800,
    width: 800,
    height: 534,
    href: "/fotoweb/cache/5005/Photos/Trollheimen/2014-07-24/DSC01646_1_2_2.t550e64f1.m800.x26ececb3.JPG",
    square: false
  },
  {
    size: 1200,
    width: 1200,
    height: 801,
    href: "/fotoweb/cache/5005/Photos/Trollheimen/2014-07-24/DSC01646_1_2_2.t550e64f1.m1200.x73ced237.JPG",
    square: false
  },
  {...},
  ...
]

A preview list is an array of objects. Each object represents one preview image. A preview image consists of an URL, which links to the actual image file, and attributes which describe the image. The attributes can be used for rendering the image and for selecting the most suitable preview image from the list.

Attributes

Name Type Description
size integer Maximum of width and height. Can be used for selecting a suitable preview based on screen resolution or canvas size.
width integer Width of the preview image in pixels
height integer Height of the preview image in pixels
href URL (string) URL of the preview image
square boolean true if the image is a square thumbnail, false if the image is in the original aspect ratio.

Remarks

Preview images accessible through preview image URLs are cached on the FotoWeb server and in front-end caches. Accessing a preview image does not require authentication, however each URL is protected by a unique signature. It is therefore not possible to calculate the URL of a preview image with specific properties from another preview image or from known information about the asset (such as the asset URL or file name) and the wanted properties of the preview (for example its size and whether or not it should have a watermark). In particular, the following is not possible, neither for an attacker nor for a legit API client:

  • Finding the non-watermarked version of a watermarked preview image
  • Finding a preview image of a larger size
  • Finding a preview image of another asset by guessing its file name (e.g., numbered file names or typical file names from digital cameras, such as DSC12345.JPG)

In order to get valid preview image URLs, a client always has to go through the API and use preview lists. Access control on the API ensures that a client can only find out about URLs of preview images to which the request user has access.'

It is not recommended to store preview URLs in external systems. Preview URLs are subject to change on configuration changes or on system upgrades. If preview image URLs are stored in a database or other external system, then the original asset URL and all other information needed for requesting new preview image URLs using the API should also be stored.

  • Was this article helpful?