Image Web Manipulator

v0.1.1 2018-01-22 15:34 UTC

This package is not auto-updated.

Last update: 2020-10-19 02:11:47 UTC


Simple image web tool manipulation package - other than all.


The best way is cloning the repo with specific branch name. Stable releases are sown here.

git clone -b {STABLE_VERSION}


In folder config copy file config.json.dist and rename to config.json. Edit file and set or delete options:

  • storage - path to the folder with pictures
  • font - path to the ttf file with font. Used as font on placeholders files.
  • debug - if TRUE no placeholder, but exception stack is shown.

Default font BlowBrush is included to the project.


For better performance for each request cache is used. REDIS if enabled. If not FILES is used.

Request url schema


params and fileName are passed to the api.php file.

Request Options (params)

Option Description Values Notes
w width value in px
h height value in px
c crop mode enum: scale,fit,fit-margin,fill
q quality 0-100 only JPG format supported
r rotate angle in degrees
bgc background color HEX format
e effect enum: g (gamma), n (negative), gr (grayscale), c (colorize), b (blur)
eo effect option string,int - depends on effect type, see table below
Effect [e] Description Option [eo] Default
g gamma gamma correcion 1
n negative
gr grayscale
c colorize color in HEX format #FFFFFF
b blur sigma 1

Nginx Configuration

server {
    listen default_server;


    index api.php;

    server_name _;

    location / {
        try_files $uri $uri/ /api.php?$args;

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SCRIPT_NAME $fastcgi_script_name;
        fastcgi_index index.php;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
server {
    ## LISTEN
    listen 81;

    ## SERVER

    root ROOT_DIR;
    index index.php index.html index.htm index.nginx-debian.html;

    location /iwt/v1 {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;

        rewrite ^/iwt/v1/?(.*) /$1 break;

        access_log /var/log/nginx/iwt-access.log;
        error_log /var/log/nginx/iwt-error.log;

        proxy_redirect off;



Height is set. Default FIT crop mode is enabled.

alt text


Blur effect.

alt text


Colorization effect with pink color.

alt text


Negative effect.

alt text


Less quality.

alt text


FILL mode.

alt text


FIT mode.

alt text



alt text


ROTATE mode.

alt text


File not found. Placeholder is shown.

alt text


Placeholder is shown.

alt text