Skip to content
forked from fhanspach/thmbnlr

A microservice for getting thumbnails of image urls

License

Notifications You must be signed in to change notification settings

jkblume/thmbnlr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thmbnlr

Thmbnlr is a simple Flask-based microservice for getting thumbnails for an image URL.

Installation

To run thmbnlr you can simply use:

python main.py

Usage

To use the thmbnlr service you have to specify load the image as in the following example:

http://thmbnlr.your-domain.org/?url=http://upload.wikimedia.org/wikipedia/commons/b/b2/Hausziege_04.jpg&width=400&max_size=100

This returns an image with a maximum width of 100 px and a maximum size of 100 kByte.

The following GET-Parameters can be used to define the resulting image:

Parameter Description Default
url mandatory - The url of the original image. -
width/height The target width/height of the thumbnail image. Typically only one is specified, since thmbnlr always keeps the original aspect ratio of the image. original width/height
quality The degree of compression in percent. 100 is the image without quality loss 100
max_size The maximum size of the result image in kB original size

When an image already satisfies all given requirements, thmbnlr will redirect you to the original image.

About

A microservice for getting thumbnails of image urls

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 65.9%
  • HTML 34.1%