Image metadata

On this page

Metadata can come from your original images or be added within Sirv.

Meta in your original images

Every image that you upload to Sirv contains potentially useful data - in EXIF, IPTC and XMP formats. Information such as creation date, copyright and GPS coordinates can be used to overlay unique text on your images; geolocate images on maps; protect your ownership rights and more.

Sirv gives you insant access to all your image metadata in a conveniently accessible JSON text file. To see the data, simply append ?info to any image URL. For example:

https://demo.sirv.com/example.jpg?info

Open that URL and you'll see a layout like this:

Example of image metadata

The metadata also shows any dynamic image options you may have applied, for example:

https://demo.sirv.com/example.jpg?h=400&saturation=-50&brightness=-15&vignette.value=30

Example image of dynamic imaging options in EXIF

Add metadata in Sirv

You can add the following metadata to any file in Sirv:

  • Title
  • Description (added in the img alt tag when using sirv.js)
  • Tags

Add your meta on the file preview page, which looks like this:

Screenshot showing how to add meta data to an image

Meta can also be added via the Sirv REST API:

Metadata in text overlays

One powerful usage of metadata is for text overlays. By referencing the metadata name inside curly braces ${}, it will be displayed on the image.

For example:

  • ${title} will display the title from Sirv.
  • ${description} will display the description from Sirv.
  • ${EXIF.Copyright} will display the EXIF copyright data.

The following example adds two metadata fields: EXIF.Model (the camera model) and IPTC.By-line (the artist). See how it is overlayed in the bottom right corner of the image:

https://demo.sirv.com/example.jpg?text.size=90%&text.color=white&text=Shot on ${EXIF.Model} by ${IPTC.By-line}

Example image with metadata overlay: camera model and artist

The example below has text positioned to the south, with a partially transparent background and red Kreon font:

https://demo.sirv.com/example.jpg?text=Credit: ${IPTC.CopyrightNotice}&text.position=south&text.color=771820&text.size=82%&text.background.opacity=27&text.background.color=white&text.font.family=Kreon

Example image with dynamic imaging applied to metadata text

The image customizer in your Sirv account will help you style your text the way you want it. Choose the location, color, font, outline and background of the text overlays. Copy the URL once you're happy with the text:

Screenshot of image customizer

Metadata for photographers

Image metadata usually contains a lot of interesting information for photographers. Digital cameras automatically record the exposure, aperture, flash, ISO, geolocation and more. The example below displays the status of the camera flash when photographed:

https://demo.sirv.com/example.jpg?h=400&text.color=white&text.size=30%&text.font.family=Rock%20Salt&text=Flash: ${XMP.FlashMode}

Image with metadata on flash

You can add several parameters, with line breaks in between using , %0A like so:

https://demo.sirv.com/example.jpg?h=400&text.color=white&text.size=50%&text.align=right&text.font.family=Shadows%20Into%20Light%20Two&text=Aperture ${EXIF.ApertureValue}%0AISO ${EXIF.ISO}%0AExposure ${EXIF.ExposureTime}

Image with photography EXIF data: aperture, ISO, exposure

An image can contain up to 4 sections of text, placed anywhere on the image. Each section can contain as many meta parameters as you wish, with up to 100 characters.

Image with photography metadata: aperture, ISO, exposure

Metadata in ecommerce

Metadata can be useful for marketing automation in ecommerce. For example, if your product names, prices or descriptions are included in the metadata, you can automatically overlay relevant text on every image:

Image of men's hoodie with text and metadata overlays

Your entire product range could have such overlays - the next image has identical options in the URL, yet shows different text, thanks to its meta:

Image of women's shirt with text and metadata overlays

You could even create personalized, targeted messages containing your customers' names. Compare the two images below:

Image personalized for Jack with text and EXIF data overlays
Image personalized for Jill with text and EXIF data overlays

Both those images have the same options, except for the names Jack & Jill, which could be fetched automatically from your customer database. This mass-personalization of imagery allows you to create highly targeted social media and campaigns.

There are all kinds of ways to use your EXIF data. Consider how a photographic tour company might overlay metadata in its marketing campaigns:

Image with GPS metadata, text and image overlays

https://demo.sirv.com/Examples/strabo-sahara.jpg?text.0.text=Join our next tour %26 take photos like this!&text.1.text=${EXIF.ImageDescription}&text.2.text=Coordinates: ${EXIF.GPSLatitude}, ${EXIF.GPSLongitude}&text.0.color=white&text.1.color=white&text.2.color=white&text.0.position=north&text.1.position.gravity=southwest&text.1.position.x=0&text.1.position.y=-40&text.2.position=southwest&text.0.font.family=Fjalla%20One&text.1.font.family=Fjalla%20One&text.2.font.family=Fjalla%20One&text.1.size=15&text.2.size=40&text.0.size=60&text.1.opacity=70&text.2.opacity=70&watermark=/Examples/strabo-logo.png&watermark.opacity=70&watermark.scale.height=40&watermark.position=southeast&watermark.canvas.height=150%&watermark.canvas.width=112%

Meta stripping

Sirv automatically removes metadata immediately before processing an image, as part of its image optimization process. This helps reduce image file size, for faster loading. (Meta is always preserved in the original master image).

If you prefer to keep your copyright and other EXIF/XMP/IPTC data in your served images, go to your Default profile > 'Image Options' section > 'Strip image metadata' option > Change from 'Enabled' to 'Disabled' > Save changes:

Create profile to disable metadata stripping

Try Sirv today

Explore the possibilities of metadata with Sirv. Create your account today and get 5GB free space for 30 days.

Was this article helpful?

Get help from a Sirv expert