Convert Figma logo to code with AI

weserv logoimages

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).

1,923
190
1,923
24

Top Related Projects

10,017

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

Fast and secure standalone server for resizing and converting remote images

A caching, resizing image proxy written in Go

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

2,092

An image resizing server written in Go

1,013

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

weserv/images is an open-source image caching and resizing service. It provides a simple API to manipulate images on-the-fly, offering features like resizing, cropping, and various filters. The project is designed to be highly performant and scalable, making it suitable for a wide range of applications.

Pros

  • Easy-to-use API for image manipulation
  • High performance and scalability
  • Supports a wide range of image formats
  • Extensive documentation and examples

Cons

  • Requires server setup and maintenance
  • Limited advanced image processing features compared to dedicated image editing software
  • May have higher resource usage for large-scale deployments

Code Examples

  1. Resizing an image:
https://wsrv.nl/?url=example.com/image.jpg&w=300&h=200

This URL resizes the image to 300x200 pixels.

  1. Applying a filter:
https://wsrv.nl/?url=example.com/image.jpg&filter=greyscale

This URL applies a greyscale filter to the image.

  1. Cropping an image:
https://wsrv.nl/?url=example.com/image.jpg&crop=300,200

This URL crops the image to 300x200 pixels from the center.

Getting Started

To use weserv/images, you can either set up your own instance or use the public API:

  1. Use the public API by constructing URLs like:

    https://wsrv.nl/?url=YOUR_IMAGE_URL&PARAMETERS
    
  2. To set up your own instance:

    • Clone the repository: git clone https://github.com/weserv/images.git
    • Follow the installation instructions in the project's README
    • Configure your web server to route requests to the weserv/images application

For detailed usage and configuration options, refer to the official documentation on the GitHub repository.

Competitor Comparisons

10,017

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

Pros of Thumbor

  • More extensive image processing capabilities, including face detection and smart cropping
  • Highly customizable with numerous plugins and extensions
  • Supports a wider range of image formats and operations

Cons of Thumbor

  • More complex setup and configuration process
  • Higher resource consumption due to its extensive feature set
  • Steeper learning curve for new users

Code Comparison

Thumbor configuration example:

SECURITY_KEY = 'MY_SECURE_KEY'
ALLOW_UNSAFE_URL = False
LOADER = 'thumbor.loaders.http_loader'
STORAGE = 'thumbor.storages.file_storage'

Images configuration example:

server {
    location /img/ {
        weserv_convert $query_string;
        weserv_image_filter;
    }
}

Both projects offer powerful image processing capabilities, but they cater to different use cases. Thumbor provides a more comprehensive solution with advanced features, making it suitable for complex image manipulation tasks. However, this comes at the cost of increased complexity and resource usage.

Images, on the other hand, focuses on simplicity and performance. It's easier to set up and integrate, especially for users familiar with Nginx. While it may not offer as many advanced features as Thumbor, it excels in providing fast and efficient image processing for common use cases.

The choice between the two depends on the specific requirements of your project, balancing between feature richness and ease of use.

Fast and secure standalone server for resizing and converting remote images

Pros of imgproxy

  • Supports a wider range of image processing operations, including advanced transformations and filters
  • Offers more flexible configuration options and fine-tuned control over image processing
  • Provides better performance for high-load scenarios due to its Go implementation

Cons of imgproxy

  • More complex setup and configuration compared to images
  • Requires more system resources to run effectively
  • Limited built-in security features compared to images' comprehensive security measures

Code Comparison

images:

$image = Image::make('image.jpg')
    ->resize(300, 200)
    ->greyscale()
    ->save('modified_image.jpg');

imgproxy:

/insecure/rs:fit:300:200/g:ce/plain/https://example.com/image.jpg

Both repositories offer image processing capabilities, but they differ in their approach and feature set. images provides a more user-friendly interface with built-in security features, making it easier to set up and use for basic image processing needs. On the other hand, imgproxy offers more advanced image manipulation options and better performance for high-load scenarios, but requires more complex configuration and resources.

A caching, resizing image proxy written in Go

Pros of imageproxy

  • Written in Go, potentially offering better performance and concurrency
  • Supports a wider range of image processing operations, including rotation and flipping
  • More flexible caching options, including support for various backends like Amazon S3

Cons of imageproxy

  • Less actively maintained, with fewer recent updates
  • Smaller community and fewer contributors
  • Limited built-in security features compared to images

Code Comparison

images (PHP):

$image = Image::make($request->file('image'));
$image->resize(300, 200);
$image->save('path/to/save/image.jpg');

imageproxy (Go):

opts := imageproxy.Options{
    Width:  300,
    Height: 200,
}
img, _ := imageproxy.Transform(sourceImage, opts)

Both repositories provide image processing capabilities, but they differ in implementation and features. images is a more actively maintained project with a larger community, while imageproxy offers potentially better performance due to its Go implementation. images has stronger built-in security features, whereas imageproxy provides more flexible caching options. The choice between the two depends on specific project requirements, preferred programming language, and desired features.

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

Pros of imaginary

  • Supports a wider range of image processing operations, including face detection and smart cropping
  • Offers more flexible deployment options, including Docker and Heroku
  • Provides a more comprehensive API with support for URL-based and multipart form data processing

Cons of imaginary

  • Generally slower performance compared to images, especially for basic operations
  • More complex setup and configuration process
  • Larger resource footprint, which may impact hosting costs for high-volume applications

Code comparison

images:

$image = Image::make('image.jpg')
    ->resize(300, 200)
    ->greyscale()
    ->save('output.jpg');

imaginary:

curl -X POST -F "file=@image.jpg" \
    "http://localhost:8088/pipeline?operations=resize:width=300,height=200&operations=grayscale" \
    -o output.jpg

Both repositories offer powerful image processing capabilities, but they cater to different use cases. images excels in simplicity and performance for basic operations, while imaginary provides a more feature-rich and flexible solution for complex image processing needs. The choice between the two depends on the specific requirements of your project, including performance needs, deployment preferences, and the complexity of image operations required.

2,092

An image resizing server written in Go

Pros of picfit

  • Supports multiple storage backends (File System, S3, Swift, Google Cloud Storage)
  • Offers more image processing operations (e.g., flip, rotate, watermark)
  • Provides a RESTful API for image manipulation

Cons of picfit

  • Less actively maintained (last commit over 3 years ago)
  • Fewer stars and forks on GitHub, indicating potentially lower community adoption
  • Limited documentation compared to images

Code Comparison

images:

img, err := imaging.Open(inputFile)
if err != nil {
    return err
}

picfit:

engine := engine.NewEngine(config)
result, err := engine.Transform(key, options)
if err != nil {
    return err
}

Both repositories provide image processing capabilities, but they differ in their approach and features. images focuses on a simple, lightweight solution with a wide range of image formats and operations. It's more actively maintained and has better documentation. picfit offers more storage options and additional image processing features but lacks recent updates and comprehensive documentation. The choice between the two depends on specific project requirements, such as storage needs and desired image manipulations.

1,013

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

  • More flexible configuration options for image processing
  • Supports a wider range of image formats, including WebP and AVIF
  • Easier to integrate with existing PHP applications

Cons of flyimg

  • Less optimized for high-performance scenarios
  • Requires more server resources to run
  • Limited documentation compared to weserv/images

Code Comparison

flyimg:

$params = [
    'w' => 300,
    'h' => 200,
    'fit' => 'crop',
    'fm' => 'webp',
];
$url = 'https://example.com/image.jpg';
$newImageUrl = $flyimg->generateUrl($url, $params);

weserv:

$params = [
    'w' => 300,
    'h' => 200,
    'fit' => 'cover',
    'output' => 'webp',
];
$url = 'https://example.com/image.jpg';
$newImageUrl = 'https://wsrv.nl/?url=' . urlencode($url) . '&' . http_build_query($params);

Both repositories provide image processing capabilities, but they differ in their approach and features. flyimg offers more flexibility and format support, making it suitable for complex PHP applications. However, weserv/images is more optimized for performance and has better documentation. The code comparison shows that flyimg uses a dedicated method for URL generation, while weserv relies on a simple URL construction approach.

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

weserv/images

wsrv.nl logo

Author Author Source code Software license CI status Coverage status

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s). weserv/images leverages powerful libraries like libvips (for image handling and manipulation) and nginx (used as web server, forward proxy and HTTP cache).

Technologies used

  • Linux, nginx and libvips (without these technologies, this project would never have been possible)
  • Cloudflare (for CDN caching and IP-blocking)
  • Redis (for rate limiting)
  • OpenDNS (for DNS-filtering)

Documentation

See our wiki documentation or API reference for information on using wsrv.nl.

Docker deployment

For information on Docker deployment, please read the Docker installation instructions.

Submitting Bugs and Suggestions

We track support tickets, issues and feature requests using the GitHub issue tracker.

Credits

Andries Louw WolthuizenKleis Auke Wolthuizen
Andries Louw WolthuizenKleis Auke Wolthuizen

License

The source code is licensed under the BSD 3-Clause License, see the LICENSE file for details.

Privacy Policy

Please see Privacy-Policy.md for more information.

Last but not least

This is made in Sneek with love and passion.

Made in Sneek logo