Images
Last updated
Last updated
Here you will find information regarding how images that are uploaded via Digital Writer (or Binary Service Lite) are handled, stored and accessed. This is a “general” documentation. Details of how to setup and configure the Digital Writer and it’s services in regards to image handling are not covered here.
As-is the Digital Writer supports image/jpeg,image/gif,image/png MIME types. The max size restriction of an image being uploaded is configurable per MIME type.
The original image is stored in a S3 bucket not publicly accessible. In addition a smaller version, a preview, of the image will be created and stored in the S3 bucket. The Digital Writer can be configured to also create a thumb derivative of the image in the bucket.
When the image gets published, a copy of the original image, for which all metadata is removed, is uploaded to another, public, S3 bucket (used for front-end rendering).
For every image uploaded, a metadata document is stored in Open Content. If the Digital Writer is configured to store the original image in Open Content, the image will be stored as the primary file (in addition to the image being stored on a S3 bucket). Otherwise the primary file will point to the metadata document. In addition, a preview and a thumb of the image is normally also uploaded to Open Content.
The image is identified by a calculated (hashed) and unique file name (i.e. not the image's original name), e.g. “0GUpOh076jJ9hgbe47zH-gZ0sx4.jpg”.
The correspondent metadata document in Open Content is given a UUID (UUID v5) that is created using the image's file given uri (x-im/image/{filename
}, e.g. “9db2f917-d397-484a-8837-519f067ed4f2”. By being able to calculate the UUID using the image’s file name the Digital Writer can avoid uploading duplicates of the same image by checking if the image already exists in Open Content.
An uploaded image will always be paired with a metadata document in Infomaker NewsML format in Open Content. The Digital Writer will extract a subset of the available metadata that is actually stored on the image binary.
In the generated metadata document for the image, the file name is specified by the <fileName>
element. The UUID is specified by the guid
attribute for <newsItem>
element.
When an image is referenced (used) in an article, the file name is specified as the last component of the uri
attribute of the <link rel=”self” type=”x-im/image” …>
element. The UUID is found as the attribute uuid
on the <object type=”x-im/image” …>
element. E.g.
By supplying metadata as a query parameter to the url of the image to upload (or to the file upload url used), metadata can be added to image and corresponding newsitem. The query parameter name must be metadata
and the value must be in the format described below. Note that the value must be a json string that is uri encoded.
And the above json would then be used as query parameter with the format as specified below;
```http request http://test.com?metadata="%7B%22ImageDescription%22%3A%22Hello World%22%2C%22By-line%22%3A%22John Doe%22%7D"
{protocol}://{imgixhostname}/1k5EJVdLeZKqTpKbl-ArSF-bna0.png
{protocol}://{imenginehostname}/imengine/image.php?uuid=133059c9-70ba-5806-a843-318c1a00d433
https://s3-{region}.amazonaws.com/{bucket}/{filename}
{protocol}://{opencontenthosname}:{port}/opencontent/objects/{uuid}/files/preview
{protocol}://{opencontenthosname}:{port}/opencontent/objects/{uuid}/files/thumb
{protocol}://{opencontenthosname}:{port}/opencontent/objects/{uuid}
{protocol}://{oc-alias}.proxy.infomaker.io
```
Labels
Fields
Mapped metadata fields
Description
ImageDescription, Caption-Abstract
xmp-dc:description, iptc:caption-abstract
Creator
Creator, By-line
xmp-dc:creator, iptc:by-line
Credit
Credit
xmp-photoshop:credit, iptc:credit
Instructions
Instructions, SpecialInstructions
xmp-photoshop:instructions, iptc:specialinstructions
Object name (original file name)
ObjectName, Title
xmp-dc:title, iptc:objectname
Photo date
DateCreated
xmp-photoshop:datecreated, iptc:datecreated
Source (not used in Writer as-is)
Credit
xmp-photoshop:source, iptc:source