Convert Figma logo to code with AI

thumbor logothumbor

thumbor is an open-source photo thumbnail service by globo.com

10,063
827
10,063
22

Top Related Projects

A caching, resizing image proxy written in Go

Fast and secure standalone server for resizing and converting remote images

Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing

2,112

An image resizing server written in Go

1,027

Dockerized application that resizes and crops images on the fly, delivering optimized images in formats such as AVIF, WebP, MozJPEG, or PNG using ImageMagick, with an efficient caching system.

Quick Overview

Thumbor is an open-source smart imaging service that enables on-demand image processing and optimization. It can resize, crop, and apply various filters to images in real-time, making it ideal for responsive web design and efficient image delivery across different devices and network conditions.

Pros

  • Highly customizable with numerous image processing options
  • Supports multiple storage backends (file system, AWS S3, Redis, etc.)
  • Extensible through custom filters and result storage engines
  • Efficient caching mechanisms for improved performance

Cons

  • Can be complex to set up and configure for advanced use cases
  • Requires careful resource management for high-traffic scenarios
  • Documentation can be outdated or incomplete in some areas
  • Limited built-in support for modern image formats like WebP and AVIF

Code Examples

  1. Basic image resizing:
from thumbor.url_builder import url_for

original_image = 'http://example.com/image.jpg'
resized_url = url_for(width=300, height=200, image_url=original_image)
print(resized_url)
  1. Applying filters:
from thumbor.url_builder import url_for

original_image = 'http://example.com/image.jpg'
filtered_url = url_for(
    width=300,
    height=200,
    filters=['brightness(10)', 'contrast(20)'],
    image_url=original_image
)
print(filtered_url)
  1. Smart cropping:
from thumbor.url_builder import url_for

original_image = 'http://example.com/image.jpg'
smart_cropped_url = url_for(
    width=300,
    height=200,
    smart=True,
    image_url=original_image
)
print(smart_cropped_url)

Getting Started

  1. Install Thumbor:

    pip install thumbor
    
  2. Create a configuration file:

    thumbor-config > thumbor.conf
    
  3. Start Thumbor server:

    thumbor --conf thumbor.conf
    
  4. Use Thumbor URLs in your application:

    from thumbor.url_builder import url_for
    
    image_url = url_for(width=300, height=200, image_url='http://example.com/image.jpg')
    

Competitor Comparisons

A caching, resizing image proxy written in Go

Pros of imageproxy

  • Lightweight and simple to set up, with minimal dependencies
  • Written in Go, offering good performance and easy deployment
  • Supports various storage backends (local, S3, Google Cloud Storage)

Cons of imageproxy

  • Limited image processing capabilities compared to Thumbor
  • Fewer built-in security features and optimizations
  • Smaller community and ecosystem

Code Comparison

Thumbor (Python):

from thumbor.handlers.imaging import ImagingHandler

class MyHandler(ImagingHandler):
    def get(self):
        # Custom image processing logic

imageproxy (Go):

import "willnorris.com/go/imageproxy"

proxy := imageproxy.NewProxy(nil, nil)
http.Handle("/", proxy)

Both projects aim to provide on-the-fly image processing and serving capabilities. Thumbor offers a more comprehensive set of features and a larger ecosystem, making it suitable for complex image processing needs. It's written in Python, which may be more familiar to some developers.

imageproxy, on the other hand, focuses on simplicity and performance. Its Go implementation makes it easy to deploy and integrate into existing Go applications. While it may lack some advanced features of Thumbor, it excels in scenarios where lightweight image proxying is required.

The choice between the two depends on the specific requirements of your project, such as the complexity of image processing needs, performance requirements, and the existing technology stack.

Fast and secure standalone server for resizing and converting remote images

Pros of imgproxy

  • Written in Go, offering better performance and lower resource usage
  • Simpler setup and configuration process
  • Supports WebP and AVIF formats out of the box

Cons of imgproxy

  • Fewer image processing options compared to Thumbor
  • Less extensive documentation and community support
  • Limited extensibility without modifying the core codebase

Code Comparison

imgproxy configuration example:

IMGPROXY_KEY: your_key
IMGPROXY_SALT: your_salt
IMGPROXY_MAX_SRC_RESOLUTION: 50
IMGPROXY_MAX_SRC_FILE_SIZE: 20971520

Thumbor configuration example:

SECURITY_KEY = 'your_key'
MAX_WIDTH = 1000
MAX_HEIGHT = 1000
QUALITY = 80
ALLOW_UNSAFE_URL = False

Both projects aim to provide on-the-fly image processing and optimization, but they differ in their approach and feature set. imgproxy focuses on simplicity and performance, while Thumbor offers more extensive customization options and a plugin system. The choice between the two depends on specific project requirements, such as performance needs, desired features, and integration complexity.

Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing

Pros of Imaginary

  • Written in Go, offering better performance and lower resource usage
  • Supports a wider range of image formats, including WebP and SVG
  • Provides a simpler API and easier deployment process

Cons of Imaginary

  • Less mature and has a smaller community compared to Thumbor
  • Fewer built-in security features and options for URL signing
  • Limited support for advanced image processing operations

Code Comparison

Thumbor (Python):

from thumbor.url import url_for
url = url_for(width=300, height=200, smart=True, image_url='image.jpg')

Imaginary (Go):

import "gopkg.in/h2non/imaginary.v1"
url, _ := imaginary.URL("image.jpg", imaginary.Options{
    Width:  300,
    Height: 200,
    Type:   "smart",
})

Both Thumbor and Imaginary are powerful image processing services, but they cater to different needs. Thumbor offers a more comprehensive set of features and a larger ecosystem, making it suitable for complex image processing requirements. Imaginary, on the other hand, provides better performance and easier deployment, making it a good choice for projects that prioritize speed and simplicity. The choice between the two depends on specific project requirements, performance needs, and the development team's expertise.

2,112

An image resizing server written in Go

Pros of picfit

  • Lightweight and fast, with minimal dependencies
  • Supports multiple storage backends (file system, S3, Google Cloud Storage)
  • Easy to deploy as a single binary

Cons of picfit

  • Less feature-rich compared to Thumbor
  • Smaller community and fewer contributions
  • Limited documentation and examples

Code Comparison

Thumbor configuration example:

SECURITY_KEY = 'MY_SECURE_KEY'
ALLOW_UNSAFE_URL = True
STORAGE = 'thumbor.storages.file_storage'

picfit configuration example:

port: 3001
storage:
  src:
    type: "file"
    path: "./images"
  dst:
    type: "file"
    path: "./processed"

Both Thumbor and picfit are image processing and manipulation services, but they have different approaches and feature sets. Thumbor is more comprehensive and widely adopted, offering a broader range of image processing capabilities and security features. picfit, on the other hand, focuses on simplicity and ease of deployment, making it a good choice for projects that require basic image resizing and don't need advanced features. The code comparison shows that Thumbor uses Python for configuration, while picfit uses YAML, reflecting their different implementation languages and approaches to configuration.

1,027

Dockerized application that resizes and crops images on the fly, delivering optimized images in formats such as AVIF, WebP, MozJPEG, or PNG using ImageMagick, with an efficient caching system.

Pros of Flyimg

  • Lightweight and fast, optimized for performance
  • Easy to deploy with Docker
  • Supports WebP format out-of-the-box

Cons of Flyimg

  • Fewer image manipulation options compared to Thumbor
  • Smaller community and less extensive documentation
  • Limited face detection capabilities

Code Comparison

Thumbor configuration example:

SECURITY_KEY = 'MY_SECURE_KEY'
ALLOW_UNSAFE_URL = True
STORAGE = 'thumbor.storages.file_storage'

Flyimg configuration example:

debug: true
options_separator: ','
mozjpeg_path: /usr/bin/mozjpeg

Both projects offer on-the-fly image manipulation, but Thumbor provides more extensive features and a larger ecosystem. Flyimg focuses on simplicity and performance, making it easier to set up and deploy. Thumbor has a more mature codebase and wider adoption, while Flyimg is newer and more lightweight.

Thumbor excels in advanced image processing tasks and security features, whereas Flyimg shines in its simplicity and Docker integration. The choice between the two depends on specific project requirements, with Thumbor being more suitable for complex image manipulation needs and Flyimg for simpler, performance-focused use cases.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Join thumbor-bootcamp for a learning and contribution experience with ❤️ and 🤗 from the thumbor team

thumbor

Crop, resize, transform and much more, all on-demand and AI Powered


thumbor is trusted by hundreds of companies worldwide

Wikipedia trusts thumbor  Globo.com trusts thumbor  Vox Media trusts thumbor  Forbes trusts thumbor  Square trusts thumbor  Deliveroo trusts thumbor  Canal+ trusts thumbor  Terra trusts thumbor  nrc trusts thumbor  web.dev indicates thumbor for high-performance web sites  aws indicates thumbor for serverless image handling
and many more!

thumbor is a smart imaging service that enables on-demand cropping, resizing, applying filters and optimizing images.

Cropping photos automatically can be a frustrating experience with severed heads involved. thumbor uses AI for smart detection.

thumbor is an HTTP server and you can create as many different images as you want just by varying path parameters:

http://<thumbor-server>/300x200/smart/thumbor.readthedocs.io/en/latest/_images/logo-thumbor.png

You should see an image of the thumbor logo in 300x200.

Learn more about all you can do in thumbor's documentation.

⚙️ Installation

Decide which installation option you want to use.

Option 1: pip

# thumbor with main dependencies only
pip install thumbor

# thumbor with OpenCV dependency
pip install thumbor[opencv]

# thumbor with all dependencies
pip install thumbor[all]

Option 2: Binary

sudo add-apt-repository ppa:thumbor/ppa
sudo aptitude update
sudo aptitude install thumbor

For more ways, please check out Installation.

Run

Running it is as easy as hit:

thumbor

After this, you can reach it on https://localhost:8888/unsafe/https://raw.githubusercontent.com/thumbor/thumbor/master/example.jpg

Troubles?

If you experience any troubles, try running:

thumbor-doctor

If you have a thumbor.conf file, you can use that to help thumbor-doctor:

thumbor-doctor -c thumbor.conf

If you still need help, please raise an issue. Remember to send your thumbor-doctor output in the issue:

thumbor-doctor --nocolor -c thumbor.conf

🎯 Features

  • supports all common images formats out of the box
  • intelligent cropping and resizing
  • blazing fast using caching
  • supports many storages (local storage, AWS S3, Rackspace, Ceph, ...)
  • AI-powered cropping based on face and feature detection (glasses, interesting points, ...)
  • integrated with many programming languages and frameworks and many more...
  • highly extensible

🌟 Awesome Goodies

awesome-thumbor is a curated list of all things thumbor. There you can find filters, storages, engines, loaders, docker images, extensions in your favorite language and framework, and much more.

All of it with a clear indication of each project's quality. Have fun!

👍 Contribute

thumbor is an open-source project with many contributors. Join them contributing code or contributing documentation.

If you use thumbor, please take 1 minute and answer this survey? Only 2 questions!

Join the chat at https://gitter.im/thumbor/thumbor

👀 Demo

You can see thumbor in action at http://thumborize.me/