GET query arguments for modifying images with Photon. Also see Photon for more information.

Photon is only allowed to be used by sites hosted on WordPress.com, or on Jetpack-connected WordPress sites. If you move to another platform, or disconnect Jetpack from your site, please also switch to another magic image service. Abuse of Jetpack or violation of the WordPress.com Terms of Service could result in suspension of your site from WordPress.com-connected services.

Resource Description
GET?w= Set the width of an image. Defaults to pixels, supports percentages.

http://i0.wp.com/s.ma.tt/files/2012/06/DSC01205.jpg?w=300

http://i0.wp.com/s.ma.tt/files/2012/06/DSC01205.jpg?w=5%

GET?h= Set the height of an image. Defaults to pixels, supports percentages.

http://i0.wp.com/s.ma.tt/files/2012/06/MCM_0629-1600x1064.jpg?h=200

http://i0.wp.com/s.ma.tt/files/2012/06/MCM_0629-1600x1064.jpg?h=10%

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.Original image: 4-MCM_0830-1600×1064.jpgcrop=12,25,60,60 takes a 60% by 60% rectangle from the source image starting at 12% offset from the left and 25% offset from the top.

http://i0.wp.com/s.ma.tt/files/2012/06/4-MCM_0830-1600x1064.jpg?crop=12,25,60,60

crop=160px,160px,788px,788px takes a 788 by 788 square starting at 160 by 160.

http://i0.wp.com/s.ma.tt/files/2012/06/4-MCM_0830-1600x1064.jpg?crop=160px,160px,788px,788px

crop=160px,25,1400px,60 shows you can also mix the parameters types, for example a 1400 pixels by 60% rectangle from the image starting at 160 pixels by 25%.

http://i0.wp.com/s.ma.tt/files/2012/06/4-MCM_0830-1600x1064.jpg?crop=160px,25,1400px,60

GET?resize= Resize and crop an image to 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.

http://i0.wp.com/s.ma.tt/files/2012/06/9-DSC01406-1600x1066.jpg?resize=400,220

http://i0.wp.com/s.ma.tt/files/2010/11/MCM_4443.jpg?resize=200,400

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.

http://i0.wp.com/s.ma.tt/files/2010/10/MCM_4049.jpg?fit=300,300

http://i0.wp.com/s.ma.tt/files/2010/10/MCM_4214.jpg?fit=300,300

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.

http://i0.wp.com/developer.files.wordpress.com/2013/03/letterboxing-example.jpg?lb=310,250

Original image

?lb=310,250

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

http://i0.wp.com/developer.files.wordpress.com/2012/11/black-letterboxing-example.jpg?ulb=true

Original image

?ulb=true

GET?filter= The filter GET parameter is optional and is used to apply one of multiple filters. Valid values are: negate, grayscale, sepia, edgedetect, emboss, blurgaussian, blurselective, meanremoval.

Original image

filter=negate

filter=grayscale

filter=sepia

filter=edgedetect

filter=emboss

filter=blurgaussian

filter=blurselective

filter=meanremoval

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 will darken an image by 40 and brightness=80will brighten an image by 80.

http://i0.wp.com/s.ma.tt/files/2011/06/MCM_9517-1600x1065.jpg?brightness=-40

http://i0.wp.com/s.ma.tt/files/2011/06/MCM_9517-1600x1065.jpg?brightness=0


http://i0.wp.com/s.ma.tt/files/2011/06/MCM_9517-1600x1065.jpg?brightness=80

brightness=-40

brightness=0

brightness=80

GET?contrast= Adjust the contrast contrast of an image. Valid values are -100 through 100. The default is zero.contrast=-50 will decrease contrast by 50 and contrast=50 will increase contrast by 50.

http://i0.wp.com/s.ma.tt/files/2011/06/MCM_9517-1600x1065.jpg?contrast=-50

http://i0.wp.com/s.ma.tt/files/2011/06/MCM_9517-1600x1065.jpg?contrast=0


http://i0.wp.com/s.ma.tt/files/2011/06/MCM_9517-1600x1065.jpg?contrast=50

contrast=-50

contrast=0

contrast=50

GET?colorize= Add color hues to an image with colorizeby passing a comma separated list of red,green,blue (RGB) values such as 255,0,0 (red), 0,255,0 (green), 0,0,255 (blue).

http://i0.wp.com/s.ma.tt/files/2012/01/DSC00259.jpg?colorize=100,0,0

http://i0.wp.com/s.ma.tt/files/2012/01/DSC00259.jpg?colorize=0,100,0


http://i0.wp.com/s.ma.tt/files/2012/01/DSC00259.jpg?colorize=0,0,100

colorize=100,0,0

colorize=0,100,0

colorize=0,0,100

GET?smooth= The smoothparameter can be used to smooth out the image.

http://i0.wp.com/s.ma.tt/files/2011/06/MCM_9230-1600x1064.jpg?smooth=1

Original image

smooth=1

From the comments area of the PHP manual on the function: “Applies a 9-cell convolution matrix where center pixel has the weight arg1 and others weight of 1.0. The result is normalized by dividing the sum with arg1 + 8.0 (sum of the matrix). Any float is accepted, large value (in practice: 2048 or more) = no change”. Simply put, 0 appears to be maximum smoothing with higher numbers being less smoothing.

GET?zoom= Use zoomto size images for high pixel ratio devices and browsers when zoomed. Not available to use with crop. Zoom is intended for use by scripts such as devicepx.js which automatically set the zoom level. Valid zoom levels are 1,1.5,2-10.

http://i0.wp.com/s.ma.tt/files/2012/02/MCM_4246-1600x1064.jpg?w=310&zoom=2

Original image

zoom=2