Filters

How Filters Work

Thumbor handles filters in a pipeline. This means that they run sequentially in the order they are specified! Given an original image with size \(60x40\) and the following transformations:

http://localhost:8888/fit-in/100x100/filters:watermark(..):blur(..):fill(red,1):upscale()/https%3A%2F%2Fgithub.com%2Fthumbor%2Fthumbor%2Fraw%2Fmaster%2Fexample.jpg

The resulting image will first check if it can fit into a \(100x100\). Since it does, the filter pipeline will kick in and:

  • add the watermark in the image;
  • blur the whole image (including the watermark);
  • Fill the outer parts of the image with red (so it will fit in \(100x100\));
  • Then it will try to upscale. This will have no effect, since at this point the image is already \(100x100\).