Image & Transform Resource

Image

This resource represents an image. Images are associated with events, locations and artists.

Often there will be several images associated with a resource with one and only one selected as the primary image. Each image will also have several transformations which are versions of that image at different sizes and crops.

Example

<?xml version="1.0"?>
<events count="6496">
 <event>
  <id>494498</id>
  <name>CRC Speedshow 2018</name>
  <images count="4">
   <image>
    <id>1114706</id>
    <is_primary>1</is_primary>
    <transforms count="4">
     <transform>
      <transformation_id>2</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ts/transformed/1114706-494498-2.png</url>
      <width>80</width>
      <height>34</height>
     </transform>
     <transform>
      <transformation_id>15</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... s/transformed/1114706-494498-15.png</url>
      <width>75</width>
      <height>75</height>
     </transform>
     <transform>
      <transformation_id>8</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ts/transformed/1114706-494498-8.png</url>
      <width>190</width>
      <height>127</height>
     </transform>
     <transform>
      <transformation_id>7</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ts/transformed/1114706-494498-7.png</url>
      <width>650</width>
      <height>280</height>
     </transform>
    </transforms>
   </image>
   <image>
    <id>1098769</id>
    <is_primary>0</is_primary>
    <transforms count="5">
     <transform>
      <transformation_id>2</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ransformed/1098769-494498-2.png?v=2</url>
      <width>80</width>
      <height>53</height>
     </transform>
     <transform>
      <transformation_id>15</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ansformed/1098769-494498-15.png?v=2</url>
      <width>75</width>
      <height>75</height>
     </transform>
     <transform>
      <transformation_id>8</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ransformed/1098769-494498-8.png?v=2</url>
      <width>190</width>
      <height>127</height>
     </transform>
     <transform>
      <transformation_id>27</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ansformed/1098769-494498-27.png?v=2</url>
      <width>350</width>
      <height>350</height>
     </transform>
     <transform>
      <transformation_id>7</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ransformed/1098769-494498-7.png?v=2</url>
      <width>650</width>
      <height>280</height>
     </transform>
    </transforms>
   </image>
   <image>
    <id>1098770</id>
    <is_primary>0</is_primary>
    <transforms count="5">
     <transform>
      <transformation_id>2</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ransformed/1098770-494498-2.jpg?v=2</url>
      <width>80</width>
      <height>53</height>
     </transform>
     <transform>
      <transformation_id>15</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ansformed/1098770-494498-15.jpg?v=2</url>
      <width>75</width>
      <height>75</height>
     </transform>
     <transform>
      <transformation_id>8</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ransformed/1098770-494498-8.jpg?v=2</url>
      <width>190</width>
      <height>127</height>
     </transform>
     <transform>
      <transformation_id>27</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ansformed/1098770-494498-27.jpg?v=2</url>
      <width>350</width>
      <height>350</height>
     </transform>
     <transform>
      <transformation_id>7</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ransformed/1098770-494498-7.jpg?v=3</url>
      <width>650</width>
      <height>280</height>
     </transform>
    </transforms>
   </image>
   <image>
    <id>1100099</id>
    <is_primary>0</is_primary>
    <transforms count="4">
     <transform>
      <transformation_id>2</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ts/transformed/1100099-494498-2.jpg</url>
      <width>80</width>
      <height>34</height>
     </transform>
     <transform>
      <transformation_id>15</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... s/transformed/1100099-494498-15.jpg</url>
      <width>75</width>
      <height>75</height>
     </transform>
     <transform>
      <transformation_id>8</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ts/transformed/1100099-494498-8.jpg</url>
      <width>190</width>
      <height>127</height>
     </transform>
     <transform>
      <transformation_id>7</transformation_id>
      <url>http://cdn.eventfinda.co.nz/uploads ... ts/transformed/1100099-494498-7.jpg</url>
      <width>650</width>
      <height>280</height>
     </transform>
    </transforms>
   </image>
  </images>
 </event>
</events>

Fields

Name Description Access*
id

Integer uniquely representing the image. Images which are merely placeholders will not have an empty id.

All
is_primary

Whether this image is the primary image. The primary image is the preferred image to represent the event.

All
transforms

A collection of transforms.

All

*Account types with access to this field, see resource documentation for more information.

Transform

Transforms are a representation of the image as different sizes and crops. Depending on the size of the image not all transforms will be possible. For example transformation_id 7 requires that the image be at least 650px wide, if it is not then the transform will not be present.

Name Description Access*
height

The height in pixels of the transformed image.

All
transformation_id

Integer representing the transformation. The transformations are described below.

All
url

The canonical URL of the transformed image.

All
width

The width in pixels of the transformed image.

All

*Account types with access to this field, see resource documentation for more information.

Image Transformations

Several transformations are provided by the API and represent different sizes and crops of the resources images.

Transformation ID Pixel Size Description
2 80x80

Resized to 80 by 80 pixels maximum, preserving aspect ratio, this transform is always attempted.

7 650x280

Resized to be 650px by 280px strictly, cropping toward center if necessary. This transformation is only attempted if the image is large enough.

8 190x127

Resized to be 190px by 127px strictly, cropping toward center if necessary, this transform is only attempted if the image is large enough.

15 75x75

Resized to be 75 by 75 strictly, cropping toward center if necessary, this transform is always attempted.

27 350x350

Resized and Centre cropped to 350x350px, this transform is only attempted is the image is large enough.