Blur Image

A Javascript snippet to blur an image using StackBlur.js


iOS 15: Works (iOS 15.2 beta 3) iOS 15: Works (iOS 15.2 beta 3)

This shortcut allows blurring one or more images using StackBlur, an almost-gaussian blur algorithm that was already fast 10 years ago when it was invented.

The default blur radius is 10 (pixels). Add ,radius=N to the image name to use a radius of N pixels (up to 255). The shortcut can process images with alpha channel (transparency) without bleeding issues.

Example of image blurring

I've simplified the original StackBlur code down to less than 4 KB, and the extra code to use it is barely larger than some URLs.

When run without input, the shortcut works as a demo, allowing the user to select one or more files and showing the result of the conversion.

  • No error checking
  • getImageData documentation at MDN
  • "Get File of Type" is used instead of "Get Contents of Webpage" to avoid that the user is misleading told that the shortcut uses Safari

Latest Release Notes

1.0.0 - Nov. 21, 2021, 7:26 p.m.

First public version