Image (AdImage)

The Image (AdImage) object contains an image. The AdImageHash parameter is used as the image identifier.

An ad can only have one image (or none at all). You can assign the same image to multiple ads. For more information, see Images in ads in the Help for Yandex.Direct.

Service

Use the AdImages service for uploading images as binary data, as well as for deleting images. To upload images asynchronously from a list of URLs, use the Upload action for the AdImage (Live) method in the Live 4 version of the API.

Images can't be edited. If you need to change an image, you must upload a new image and assign it to the ad.

To assign an image to an ad or unassign one from an ad, use the Ads service. See Add-ons to ads.

An image undergoes review only when it is assigned to an ad. See Result of reviewing add-ons.

You can delete an image only if it is not assigned to any ads. To get a list of ads that a particular image is assigned to, use the Ads service.

Restrictions

The maximum number of images per advertiser is 1000 + 2 × the number of ads.

To check how many images a client can upload and how many have already been uploaded or are being uploaded, use the GetLimits action for the AdImage (Live) method in the Live 4 version of the API.

Requirements for images uploaded via the API

  • Allowed image formats: JPG, PNG, GIF.

  • Acceptable image sizes for image ads:

    • 240 × 400, 300 × 250, 300 × 500, 300 × 600, 336 × 280, 640 × 100, 640 × 200, 640 × 960, 728 × 90, 960 × 640, 970 × 250.

    • Maximum file size of 120 KB.

  • Acceptable image sizes for other types of ads:

    • When the aspect ratio is from 1:1 to 3:4/4:3 — from 450 to 5000 pixels on a side.

    • When the aspect ratio is 16:9, each side must be from 1080 × 607 to 5000 × 2812 pixels long.

    • Maximum file size of 10 MB.

Type of image

The type of image (the Type parameter returned by the get method) is determined automatically during upload. The types are described in the table:

Type Description Suitable for ad types
REGULAR

Aspect ratio from 1:1 to 3:4/4:3

Size from 450 to 5000 pixels on each side

TEXT_AD

DYNAMIC_TEXT_AD

WIDE

Aspect ratio of 16:9

Size from 1080 × 607 to 5000 × 2812 pixels

TEXT_AD

DYNAMIC_TEXT_AD

MOBILE_APP_AD

FIXED_IMAGE One of the sizes 240 × 400, 300 × 250, 300 × 500, 300 × 600, 336 × 280, 640 × 100, 640 × 200, 640 × 960, 728 × 90, 960 × 640, 970 × 250 IMAGE_AD
Note. For backward compatibility, the following image types are used:
  • SMALL — Aspect ratio from 1:1 to 3:4; size of 150 pixels on the shorter side.

  • UNFIT — The image type is unknown or unsupported in this version of the API.

Images with this type can't be assigned to an ad.