25.5. HOW TO: Create download links for images using nla.obj
identifiers#
On this page
25.5.1. Introduction#
Many of the resources digitised by the NLA and its partners are made up of images. These might be digitised copies of visual material like photos and maps, or scanned pages of print publications like books or periodicals. In Trove, each image or page has its own unique nla.obj
identifier. You can use these identifiers to construct urls that lead directly to downloadable versions of the image file.
25.5.2. Method#
To construct a url to an image file you just add a suffix to the identifier url. For example, this photograph of a group of school children with gardening tools has the identifier nla.obj-141828112
. To create a direct link to the image, you just add /image
to the identifier url:
https://nla.gov.au/nla.obj-141828112/image
The /image
suffix is probably the most useful option as it provides access to the image at its highest available resolution. In many cases this will be at a higher resolution than is available through the download option provided by the web interface. There are, however, other possible image suffixes:
url suffix |
description |
---|---|
|
leads to a higher-resolution JPEG version of the image (longest dimension is a maximum of 5000px) |
|
leads to a thumbnail version of the image (usually around 123px wide) |
|
leads to an image which has been selected to represent a collection |
|
leads to a very high-resolution TIFF version of the image (only available for selected resources, mostly maps) |
There are additional parameters you can use with /image
and /representativeImage
, though I’m not sure how reliably they work:
parameter |
description |
---|---|
|
desired width in pixels |
|
desired height in pixels |
For example: https://nla.gov.au/nla.obj-141828112/image?wid=500
Image sizes
The sizes of images downloaded using the /image
suffix vary unpredictably. Sizes seem to range up to a maximum of 5000 pixels along the longest dimension, but some are much smaller, including many digitised photographs. However, images obtained this way are at the same, or higher, resolution than those available through Trove’s built-in download option.
25.5.3. More examples#
This photograph of some angry penguins on Heard Island has the identifier nla.obj-147135602
.
The persistent url is created by adding |
|
To view the photograph in Trove’s digitised image viewer, you just add |
|
To access a thumbnail version of the image, you add |
|
To access a high-resolution version of the image, you add |
|
To access a version of the image that is 1000 pixels wide, you add |
This works the same way with pages in books and periodicals, however, the urls are a bit more complicated. For example, this page in The Home also features a photo of penguins by Frank Hurley. The page’s identifier is nla.obj-387326197
.
The persistent url is created by adding |
|
If you access the page’s persistent url you are redirected to the issue, with the page identifier included as a |
https://nla.gov.au/nla.obj-387284380/view?partId=nla.obj-387326197 |
To access a thumbnail version of the page image, you add |
|
To access a high-resolution version of the page image, you add |
|
To access a version of the image that is 500 pixels high, you add |
25.5.4. Getting image/page identifiers#
If you want to use this method in a computational process to download all the images in a collection or publication you need some way of finding all the image/page identifiers. The method for doing depends on the type of digitised resource you’re dealing with.
If you’re downloading images from a resource that is made up of pages, such as a book or periodical, you need to:
extract the metadata embedded in the digitised book or journal viewer
get a list of page identifiers from the metadata
If you’re downloading images from a collection of photographs, maps, or manuscripts, you need to:
harvest item identifiers from the digitised collection viewer
In fact, the latter method will also work with books and periodicals because they’re treated like collections of pages, but it’s much more efficient to grab the page identifiers from the embedded metadata.
25.5.5. Availability of high-resolution TIFF files#
As noted the /m
suffix can be used to download huge, high-resolution TIFF versions of some images. I’ve only come across this option amongst the digitised maps, though it could be available elsewhere. If you add the /m
suffix to an image that doesn’t have a TIFF version you’ll end up downloading a jpeg placeholder image that says ‘Not available online’. So how can you determine if a TIFF version is available to download? You need to:
extract the metadata embedded in the digitised map viewer
inspect the
copies
metadata to find a verion withcopyrole
set tom
andaccess
set to `true