Skip to content

Latest commit

 

History

History
173 lines (137 loc) · 4.19 KB

reference.md

File metadata and controls

173 lines (137 loc) · 4.19 KB

Configuration Reference

General

Overview general of all configuration.

jb_phumbor:
    server:
        url: http://localhost:80
        secret: ""
    transformations:
        transformation_name:
            trim: true
            crop:
                top_left_x: 5
                top_left_y: 5
                bottom_right_x: 50
                bottom_right_y: 50
            fit_in:
                width: 50
                height: 50
            full_fit_in:
                width: 50
                height: 50
            resize:
                width: 50
                height: 50
            halign: center
            valign: middle
            smart_crop: true
            metadata_only: true
            filters:
                - { name: "brightness", arguments: 52 }

server.url

Configure the url of your thumbor server

server.secret

The secret shared with your thumbor server

transformations.<transformation_name>.trim

Trim surrounding space from the thumbnail. The top-left corner of the image is assumed to contain the background colour. To specify otherwise, pass either 'top-left' or 'bottom-right'.

jb_phumbor:
    transformations:
        transformation_name:
            trim: true

transformations.<transformation_name>.crop

Manually specify crop window

jb_phumbor:
    transformations:
        transformation_name:
            crop:
                top_left_x: 5
                top_left_y: 5
                bottom_right_x: 50
                bottom_right_y: 50

transformations.<transformation_name>.fit_in

Resize the image to fit in a box of the specified dimensions.

jb_phumbor:
    transformations:
        transformation_name:
            fit_in:
                width: 50
                height: 50

Use either fit_in or resize but not both

transformations.<transformation_name>.resize

Resize the image to the specified dimensions. Overrides any previous call to fitIn or resize. Use a value of 0 for proportional resizing.

jb_phumbor:
    transformations:
        transformation_name:
            resize:
                width: 50
                height: 50

Use either fit_in or resize but not both

transformations.<transformation_name>.halign

Specify horizontal alignment used if width is altered due to cropping. Choose on of the following value : 'left', 'center', 'right'

jb_phumbor:
    transformations:
        transformation_name:
            halign: center

transformations.<transformation_name>.valign

Specify horizontal alignment used if width is altered due to cropping. Choose on of the following value : 'left', 'center', 'right' Specify vertical alignment used if height is altered due to cropping. Choose on of the following value : 'top', 'middle', 'bottom'

jb_phumbor:
    transformations:
        transformation_name:
            valign: middle

transformations.<transformation_name>.smart_crop

Specify that smart cropping should be used (overrides halign/valign).

jb_phumbor:
    transformations:
        transformation_name:
            smart_crop: true

transformations.<transformation_name>.metadata_only

Specify that JSON metadata should be returned instead of the thumbnailed.

jb_phumbor:
    transformations:
        transformation_name:
            metadata_only: true

transformations.<transformation_name>.filters

Append one or many filters. The filter must be defined with an array with key name and arguments. arguments can be an array if the filter needs it

jb_phumbor:
    transformations:
        transformation_name:
            filters:
                - { name: "brightness", arguments: 52 }