Skip to content

Site Accelerator API

The Site Accelerator API lets you resize, crop, and filter images served by the Site Accelerator, the WordPress.com content delivery network (CDN) for images and static files. Add GET query arguments to an image’s i0.wp.com, i1.wp.com, or i2.wp.com URL to change how the image is served.

The Site Accelerator is on by default for WordPress.com sites. To turn it on or off, see Enable the site accelerator (CDN).

Limits

The Site Accelerator handles GIF, PNG, JPG, and WebP images up to 50 MB. Filters that need heavy processing, such as brightness, contrast, colorize, and smooth, aren’t applied to large images. Use the Site Accelerator only for sites hosted on WordPress.com or WordPress sites connected to Jetpack.

For the full list, see Limitations of the site accelerator and Limitations of Site Accelerator.

Query arguments

Crop, resize, and filter images served by the Site Accelerator with the following GET query arguments.


GET?w=

Set the width of an image in pixels:

?w=300

The Fox Oakland Theater sign with a green traffic light in the foreground and people walking down the street.

GET?h=

Set the height of an image in pixels:

?h=200

Close-up of purple lavender flowers with a bee collecting nectar.

GET?crop=x,y,w,h

Crop an image by percentages x-offset, y-offset, width, height (x,y,w,h). Percentages are used so that you don’t need to recalculate the cropping when transforming the image in other ways such as resizing it.

For example, the following image takes a 60% by 60% rectangle from the source image starting at 12% offset from the left and 25% offset from the top.

?crop=12,25,60,60

Close-up of glass containers with various colorful sauces or jams, displayed on a white tablecloth, with small spoons beside them.

The next image takes a 788 by 788 square starting at 160 by 160.

?crop=160px,160px,788px,788px

Close-up of three glass containers with domed lids, each holding different colored sauces or jams, placed on a white tablecloth.

You can also mix the parameters types, for example a 1400 pixels by 60% rectangle from the image starting at 160 pixels by 25%.

?crop=160px,25,1400px,60

A row of small glass jars containing colorful sauces or condiments, each topped with a glass lid, placed on a white tablecloth with silver spoons beside them.

To crop an image to an exact size in pixels, add crop=1 with w and h, for example ?w=300&h=300&crop=1.


GET?resize=

Resize and crop an image to the exact width,height pixel dimensions. Set the first number as close to the target size as possible and then crop the rest. Which direction it’s resized and cropped depends on the aspect ratios of the original image and the target size.

?resize=400,220

Scenic view of a coastal landscape with hills, a winding road, and a clear blue sky.

?resize=200,400

A tabby cat resting its front paws on a balcony railing, with a blurred background of greenery.

This is useful for taking an image of any size and making it fit into a certain location while losing as little of the image as possible.


GET?fit=

Fit an image to a containing box of width, height dimensions. Image aspect ratio is maintained.

?fit=300,300

A reflective metallic sphere sculpture on a wet surface, capturing the surrounding cityscape and trees.

?fit=300,300

A bottle of Jameson Distillery Reserve 12 whiskey displayed next to a glass of red wine on a dining table.

For example, fit=100,100 on a landscape image with dimensions 400×300 will result in an image that is 100×75, while fit=100,100 on a portrait image with dimensions 300×400 will result in an image that is 75×100.


GET?lb=

Add black letterboxing effect to images, by scaling them to width, height while maintaining the aspect ratio and filling the rest with black.

Original Image

A scenic view of a calm sea with rocky shores under a cloudy sky, showcasing a distant coastline with mountains.

?lb=310,250

Scenic view of a rocky coastline with waves crashing against the rocks, under a cloudy sky, with distant mountains and a coastal town in the background.

GET?ulb=

Remove black letterboxing effect from images with ulb. This function takes only one argument, true.

Original Image

Black and white image of two men in a crowd, one wearing a cap with 'RIP G' and the other looking on.

?ulb=true

Black and white image of two individuals in a lively atmosphere, one wearing a cap with 'RIP' printed on it and smiling, while the other appears contemplative.

GET?filter=

Use filter to apply up to three filters, separated by commas, such as filter=grayscale,negate. The filters run in the order you list them, and any after the third are ignored. Valid values are negate, grayscale, sepia, edgedetect, emboss, blurgaussian, blurselective, and meanremoval.

Original Image

A cup of tea with a teabag on a saucer, accompanied by a piece of pastry and a teapot in the background.

?filter=negate

An inverted image of a cup with a tea bag on a saucer, accompanied by a blue pastry and a teapot.

?filter=grayscale

A black and white image of a coffee cup with a tea bag tag, a piece of bread, and a teapot in the background, placed on a wooden surface.

?filter=sepia

A cup of coffee with a tea bag on the saucer, accompanied by a biscuit and a teapot in the background.

?filter=edgedetect

A cup of coffee on a saucer with a biscuit, accompanied by a teapot, featuring a label on the cup.

?filter=emboss

Cup of coffee with a pastry on a plate, a sugar packet in the cup, and a teapot in the background, artistically filtered.

?filter=blurgaussian

A cup of tea with a teabag tag, accompanied by a teapot and a piece of bread on a saucer, placed on a wooden table.

?filter=blurselective

A cup of coffee with a logo sticker on it, accompanied by a small plate with a pastry, a teapot, and a sugar packet, all placed on a wooden table.

?filter=meanremoval

A cup of tea with a teabag resting on the rim, accompanied by a pastry on a plate, set on a wooden table.

GET?brightness=

Adjust the brightness of an image. Valid values are -255 through 255 where -255 is black and 255 is white. Higher is brighter. The default is zero.

?brightness=-40

A bird in flight against a gray sky.

?brightness=0

A bird flying against a cloudy gray sky.

?brightness=80

A white bird in flight against a bright white background.

GET?contrast=

Adjust the contrast of an image. Valid values are -100 through 100. The default is zero.

?contrast=-50

A bird flying against a cloudy sky.

?contrast=0

A bird in flight against a gray sky.

?contrast=50

A bird in flight against a white background.

GET?colorize=

Add color hues to an image with colorize by passing a comma-separated list of red, green, and blue (RGB) values. For example, use 255,0,0 for red, 0,255,0 for green, or 0,0,255 for blue.

?colorize=100,0,0

A lighthouse on a rocky cliff, tinted red.

?colorize=0,100,0

A lighthouse on a rocky cliff, tinted green.

?colorize=0,0,100

A lighthouse on a rocky cliff, tinted blue.

GET?smooth=

The smooth parameter can be used to smooth out the image.

Original image

Close-up view of a vintage aircraft engine and propeller with orange and white color scheme, showcasing the engine components and a glimpse of the landscape in the reflection.

?smooth=1

Close-up view of an orange and white vintage airplane with a propeller, set against a clear blue sky.

According to the PHP manual, the function applies a 9-cell convolution matrix where the center pixel is weighted by the value of the first argument, and all surrounding pixels have a weight of 1. The result is normalized by dividing by the total weight. In simpler terms, a value of 0 results in maximum smoothing, while higher values reduce the smoothing effect. Values around 2048 or more have little to no visible impact.


GET?zoom=

Use zoom to serve larger images to high pixel density screens and to browsers that are zoomed in. zoom multiplies the size you set with w, h, fit, or resize. Use any value from 1 to 10. Values above 3 round up to the nearest 0.5, and values above 10 count as 10. You can’t use zoom together with crop.

Original image

A child holding a stick with smoke rising, in front of a crowd during a celebration outdoors, with mountains in the background.

?zoom=2

A young girl dressed in a blue dress holds a tall bundle of burning sticks while an Ethiopian flag flutters in the background. The scene is set in a rural area with a group of spectators in the background.

GET?quality=

Use quality to set the output quality of an image. Valid values are 20 through 100, and a lower value is treated as 20. The degree of compression depends on the image, its lossy or lossless nature, and the requesting web browser’s capabilities.

For lossless images, providing the quality input less than 100 will result in a lossy image provided the requested browser supports this image type. Below is an example that shows conversion of a non-transparent PNG (lossless) image to a JPEG (or lossy WebP if browser supports it) when quality is specified.

If you don’t set quality, the Site Accelerator tries to keep the original quality.

Original image

Close-up image of two black ants interacting on a piece of wood with a blurred green background.

?quality=50

Close-up of two ants engaged in a confrontation on a wooden surface, with a blurred natural background.

Original png image

Original png (lossless) image

?quality=60

Original image is now converted to jpeg (lossy) because `?quality=60` attribute is specified

GET?allow_lossy=

Use allow_lossy to control whether the Site Accelerator can serve a lossy-compressed version of an image. With allow_lossy=1, the Site Accelerator tries to deliver a lossy format, such as JPEG or WebP, when the browser supports it.

Below is an example that demonstrates how a non-transparent PNG (lossless) image can be converted to a JPEG (or lossy WebP if browser supports it) when allow_lossy=1 is included in the request.

Original png image

Original png (lossless) image

?allow_lossy=1

Original image is now converted to jpeg (lossy) because `?allow_lossy=1` attribute is specified

GET?strip=

Use the strip functionality to control how metadata is preserved. Color profiles are always applied and removed, but other metadata may be kept. All data is stripped by default, with any existing orientation data being first applied to the image. There are two valid settings for this parameter:

  • all: strips all extraneous data (this is the default).
  • none: preserves Exif, IPTC, and XMP.

Original image

Close-up of yellow flowers with a green background.

?strip=none

Close-up of vibrant yellow flowers amidst green foliage, taken from above.

Last updated: December 02, 2026