Skip to content

Images: resize, crop and format

The image URLs in the XML feed and in the Content API point to the MEGOGO image CDN (*.vcdn.biz). The CDN can resize an image, crop it, add borders and change the file format. Use these operations to get the image size that your screen needs. Then your application does not download large images.

URL format

Add the operation to the end of the image URL:

{image_url}/pt/{operation}{width}x{height}
{image_url}/pt/{operation}{width}x{height}x{format}
Part Value
{image_url} An image URL from the XML feed or from the Content API, for example https://s4.vcdn.biz/static/f/11995104541/image.jpg
{operation} r (resize), c (crop) or p (padding). See Operations
{width}x{height} The size in pixels. You can use any size, see Sizes. 0 means: calculate this value from the proportions of the image
{format} Optional. The file format of the result: 1 JPEG, 2 GIF, 3 PNG, 4 WebP, 5 AVIF. See Change the format

Example:

https://s4.vcdn.biz/static/f/11995104541/image.jpg/pt/r155x220

WARNING

Use the Latin letter x between the numbers. Some keys of the Content API (image_470х270) contain the Cyrillic letter х. If you copy it into the URL, the CDN does not change the image and gives the original image.

Operations

Operation Code Result Example Result for an original of 2500 × 3525 px
Resize r The image keeps its proportions and fits in the specified size. One side is equal to the specified size, the other side is smaller or equal /pt/r260x260 184 × 260
Crop c The image fills the specified size. The CDN cuts the parts that do not fit. If the proportions are the same, the CDN only resizes the image /pt/c260x260 260 × 260
Padding p The image keeps its proportions and fits in the specified size. The CDN fills the empty space with black borders /pt/p260x260 260 × 260, black borders on the left and on the right
  • Resize does not make an image larger than the original. If the specified size is larger, you get the original size.
  • Crop and padding can make an image larger than the original. Select a size that is not larger than the original image, or the quality of the image decreases.

Change the format

Add x{format} after the size:

Code Format Example
1 JPEG /pt/r193x272x1
2 GIF /pt/r193x272x2
3 PNG /pt/r193x272x3
4 WebP /pt/r193x272x4
5 AVIF /pt/r193x272x5

To keep the original size and change only the format, use the size 0x0 or the size of the original image: /pt/c0x0x4 gives the original image in WebP.

We recommend WebP or AVIF: the files are smaller than JPEG files of the same size. Before you use AVIF, make sure that all your platforms can show it.

Sizes

You can use any size. This list gives sizes that MEGOGO uses:

Type Sizes (width × height, px)
Vertical 40x56, 70x100, 90x128, 115x200, 130x187, 130x2000, 140x200, 148x210, 155x220, 160x225, 162x2000, 170x240, 172x248, 180x256, 193x272, 193x278, 208x290, 220x318, 236x338, 260x374, 260x375, 282x414, 300x423, 330x460, 350x500, 352x450, 370x520, 382x540, 386x544, 540x2000, 668x1000, 700x1000, 772x1088
Horizontal 88x65, 100x56, 105x60, 105x85, 125x70, 126x71, 130x70, 136x86, 150x85, 155x87, 162x100, 172x96, 193x110, 200x112, 215x120, 220x100, 220x125, 230x130, 236x107, 236x132, 260x140, 264x150, 272x172, 300x168, 300x170, 300x200, 300x253, 310x174, 352x200, 426x270, 440x200, 460x342, 462x270, 470x270, 480x330, 492x284, 600x336, 600x340, 600x506, 640x360, 646x210, 675x255, 900x340, 920x684, 935x525, 980x560, 1080x340, 1200x68, 1280x720, 1350x510, 1600x520, 1620x540, 1920x1080
Square 40x40, 50x50, 60x60, 70x70, 80x80, 88x88, 93x93, 100x100, 105x105, 120x120, 140x140, 150x150, 170x170, 180x180, 225x225, 230x230, 260x260, 300x300, 345x345, 370x370
Width only (the height changes with the image) 136x0, 272x0, 300x0, 375x0, 460x0, 600x0, 750x0, 920x0, 1600x0, 3200x0
Height only (the width changes with the image) 0x110, 0x132, 0x170, 0x180, 0x284, 0x340, 0x360, 0x680

For a vertical poster (proportion about 1 : 1.41), use a vertical size with the same proportion, for example 193x272 or 300x423, and the operation r. For a horizontal image (16 : 9), use for example 640x360 or 1280x720.

Cache

The CDN keeps each result in its cache. The response has Cache-Control: max-age=31536000 (one year). Use the same URL for the same image and size: then the image comes from the cache.


Guide version 1.4.1, 2026-10-31 · Report a problem on this page