GoStream CDN Image Processing

Resize Fit

Resize Fit will fit the image within the given dimension:

Example:

http(s)://cdn.gostream.com/app/resizefit-widthXheight-option/example.jpg|webp|gif|png

The gray box shows the 200×200 dimension that the images fit in.
resize-fit

 

Resize Exact

Resize Exact will use the exact dimensions given, ignoring the aspect ratio. Here images appear squashed.
It is useful if you want to force exact dimensions:

Example:

http(s)://cdn.gostream.com/app/resizeexact-widthXheight-option/example.jpg|webp|gif|png

resize-exact

 

Resize Fill

Resize Fill will fill the entire dimension given. Excess parts are cropped:

Example:

http(s)://cdn.gostream.com/app/resizefill-widthXheight-option/example.jpg|webp|gif|png

resize-fill

 

Resize Exact Width

With resizeExactWidth, the height is auto calculated. Useful if you want column of images to be exactly the same width:

Example:

http(s)://cdn.gostream.com/app/resizeexactwidth-widthXheight-option/example.jpg|webp|gif|png

resize-exact-width

 

Resize Exact Height

With resizeExactHeight, the width is auto calculated. Useful if you want row of images to be exactly the same height:

Example:

http(s)://cdn.gostream.com/app/resizeexactheight-widthXheight-option/example.jpg|webp|gif|png

resize-exact-height

 

Basic Crop

Grafika accepts the following crop position:

  • top-left
  • top-center
  • top-right
  • center-left
  • center
  • center-right
  • bottom-left
  • bottom-center
  • bottom-right

Example:

Given this input image and the code below:

basic-crop

http(s)://cdn.gostream.com/app/crop-260X150-topleft/example.jpg|webp|gif|png
http(s)://cdn.gostream.com/app/crop-260X150-topcenter/example.jpg|webp|gif|png
http(s)://cdn.gostream.com/app/crop-260X150-topright/example.jpg|webp|gif|png
http(s)://cdn.gostream.com/app/crop-260X150-centerleft/example.jpg|webp|gif|png
http(s)://cdn.gostream.com/app/crop-260X150-center/example.jpg|webp|gif|png
http(s)://cdn.gostream.com/app/crop-260X150-centerright/example.jpg|webp|gif|png
http(s)://cdn.gostream.com/app/crop-260X150-centerright/example.jpg|webp|gif|png
http(s)://cdn.gostream.com/app/crop-260X150-bottomleft/example.jpg|webp|gif|png
http(s)://cdn.gostream.com/app/crop-260X150-bottomcenter/example.jpg|webp|gif|png
http(s)://cdn.gostream.com/app/crop-260X150-bottomright/example.jpg|webp|gif|png
http(s)://cdn.gostream.com/app/crop-260X150-bottomright/example.jpg|webp|gif|png

The above code would look like this if arranged in a 3×3 grid:

basic-crop-3x3

 

Smart Crop

Grafika can also do smart cropping wherein it decides the crop position with the important regions of the images preserved.

Example:

http(s)://cdn.gostream.com/app/crop-260X150-smart/example.jpg|webp|gif|png

smart-crop

 

FILTERS

 

Blur

Blurs the image.

Parameters

Amount
The amount of blur to apply. Possible values 1-100.

Example:

http(s)://cdn.gostream.com/app/blur-0X0-value/example.jpg|webp|gif|png

filter-blur

 

Brightness

Change the image brightness.

Parameters

Amount
The amount of brightness to apply. >= -100 and <= -1 to darken. 0 for no change. >= 1 and <= 100 to brighten.

Example:

http(s)://cdn.gostream.com/app/brightness-0X0-value/example.jpg|webp|gif|png

filter-brightness

 

Contrast

Change the contrast of an image. Contrast is the difference in luminance or colour that makes an object distinguishable.

Parameters

Amount
The amount of contrast to apply. >= -100 and <= -1 to reduce. 0 for no change. >= 1 and <= 100 to increase.

Example:

http(s)://cdn.gostream.com/app/contrast-0X0-value/example.jpg|webp|gif|png

filter-contrast

 

Dither

Dither image. Dithering will reduce the color to black and white and add noise.

Parameters

type
Dithering algorithm to use. Options: diffusion, ordered. Defaults to diffusion.

Example:

http(s)://cdn.gostream.com/app/dither-0X0-diffusion/example.jpg|webp|gif|png

filter-diffusion-dithering

Example:

http(s)://cdn.gostream.com/app/contrast-0X0-ordered/example.jpg|webp|gif|png

filter-diffusion-ordered-dithering

 

Gamma

Performs a gamma correction on an image.

Parameters

amount
The amount of gamma correction to apply. >= 1.0

Example:

http(s)://cdn.gostream.com/app/gamma-0X0-value/example.jpg|webp|gif|png

filter-gamma

 

Grayscale

Turn image into grayscale.

Parameters

This function has no parameters.

Example:

http(s)://cdn.gostream.com/app/grayscale-0X0-0/example.jpg|webp|gif|png

filter-grayscale

 

Invert

Invert the image colors.

Parameters

This function has no parameters.

Example:

http(s)://cdn.gostream.com/app/invert-0X0-0/example.jpg|webp|gif|png

filter-invert

 

Pixelate

Pixelate an image.

Parameters

amount
The size of pixelation. >= 1

Example:

http(s)://cdn.gostream.com/app/pixelate-0X0-value/example.jpg|webp|gif|png

filter-pixelate

 

Sharpen

Sharpen an image.

Parameters

amount
Amount of sharpening from >= 1 to <= 100

Example:

http(s)://cdn.gostream.com/app/sharpen-0X0-value/example.jpg|webp|gif|png

filter-sharpen

 

Sobel

Sobel filter is an edge detection filter.

Parameters

This function has no parameters.

Example:

http(s)://cdn.gostream.com/app/sobel-0X0-0/example.jpg|webp|gif|png

filter-sobel

WordPress Lightbox Plugin