Giter Site home page Giter Site logo

piuma's Introduction

Piuma Build Status Coverage Status

Simple and fast image optimizer service you can host on your machine

Install

$ go get github.com/piumaio/piuma

Requirements

Since this project automates two applications, you will need them to be installed on your machine for us to be able to reach them:

Run

$ piuma

You can also change the default port and mediapath, type

$ piuma --help

for more info.

Running with Docker

Use the following command to build the Docker image from the root folder:

docker build -t piuma .

Next, you can run the image and provide the port and the mediapath where the optimized images will be stored:

docker run -p 8080:8080 -v $PWD:/data piuma -mediapath /data

Above command will run Piuma on http://localhost:8080 and it's going to store all optimized images in the current directory ($PWD).

Usage

https://yourpiumahost/Options/Image_URL

Where options are values separated by _

width_height_quality

Where quality is a value between 0 and 100.

To get your image resized to 100 x 100:

https://yourpiumahost/100_100/Image URL

If you want to specify only the width, you'll get a new image keeping the ratio:

https://yourpiumahost/100/Image URL

If you want to specify only the height

https://yourpiumahost/0_100/Image URL

Running tests

To run the unit tests, change to the directory with tests (files ending with _test.go contain unit tests) and run:

$ go test -v ./...

piuma's People

Contributors

astagi avatar iskandar-ki avatar kiwiroy avatar owanesh avatar b0tero avatar remeic avatar lotrekadmin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.