<commit_before>#####################################################################
### THIS FILE IS MANAGED BY PUPPET
#####################################################################

################################### Logging ####################################

## Logging configuration as json
## Defaults to: None
#THUMBOR_LOG_CONFIG = None

## Log Format to be used by thumbor when writing log messages.
## Defaults to: %(asctime)s %(name)s:%(levelname)s %(message)s
#THUMBOR_LOG_FORMAT = '%(asctime)s %(name)s:%(levelname)s %(message)s'

## Date Format to be used by thumbor when writing log messages.
## Defaults to: %Y-%m-%d %H:%M:%S
#THUMBOR_LOG_DATE_FORMAT = '%Y-%m-%d %H:%M:%S'

## Host to send statsd instrumentation to
## Defaults to: None
STATSD_HOST = '<%= @statsd_host %>'

## Port to send statsd instrumentation to
## Defaults to: None
STATSD_PORT = <%= @statsd_port.to_i %>

## Prefix for statsd
## Defaults to: None
STATSD_PREFIX = '<%= @statsd_prefix %>'

################################################################################


################################### Imaging ####################################

## Max width in pixels for images read or generated by thumbor
## Defaults to: 0
#MAX_WIDTH = 0

## Max height in pixels for images read or generated by thumbor
## Defaults to: 0
#MAX_HEIGHT = 0

## Min width in pixels for images read or generated by thumbor
## Defaults to: 1
#MIN_WIDTH = 1

## Min width in pixels for images read or generated by thumbor
## Defaults to: 1
#MIN_HEIGHT = 1

## Allowed domains for the http loader to download. These are regular
## expressions.
## Defaults to: []
#ALLOWED_SOURCES = #    [
#    ]


## Quality index used for generated JPEG images
## Defaults to: 80
QUALITY = 87

## Exports JPEG images with the `progressive` flag set.
## Defaults to: True
#PROGRESSIVE_JPEG = True

## Quality index used for generated WebP images. If not set (None) the same level
## of JPEG quality will be used.
## Defaults to: None
#WEBP_QUALITY = None

## Specifies whether WebP format should be used automatically if the request
## accepts it (via Accept header)
## Defaults to: False
#AUTO_WEBP = False

## Max AGE sent as a header for the image served by thumbor in seconds
## Defaults to: 86400
MAX_AGE = 31536000

## Indicates the Max AGE header in seconds for temporary images (images with
## failed smart detection)
## Defaults to: 0
#MAX_AGE_TEMP_IMAGE = 0

## Indicates whether thumbor should rotate images that have an Orientation EXIF
## header
## Defaults to: False
RESPECT_ORIENTATION = True

## Ignore errors during smart detections and return image as a temp image (not
## saved in result storage and with MAX_AGE_TEMP_IMAGE age)
## Defaults to: False
#IGNORE_SMART_ERRORS = False

## Sends If-Modified-Since & Last-Modified headers; requires support from result
## storage
## Defaults to: False
#SEND_IF_MODIFIED_LAST_MODIFIED_HEADERS = False

## Preserves exif information in generated images. Increases image size in
## kbytes, use with caution.
## Defaults to: False
PRESERVE_EXIF_INFO = True

## Indicates whether thumbor should enable the EXPERIMENTAL support for animated
## gifs.
## Defaults to: True
#ALLOW_ANIMATED_GIFS = True

## Indicates whether thumbor should use gifsicle engine. Please note that smart
## cropping and filters are not supported for gifs using gifsicle (but won't
## give an error).
## Defaults to: False
USE_GIFSICLE_ENGINE = True

## Indicates whether thumbor should enable blacklist functionality to prevent
## processing certain images.
## Defaults to: False
#USE_BLACKLIST = False

## Size of the thread pool used for image transformations.  The default value is
## 0 (don't use a threadpoool.  Increase this if you are seeing your IOLoop
## getting blocked (often indicated by your upstream HTTP requests timing out)
## Defaults to: 0
#ENGINE_THREADPOOL_SIZE = 0

################################################################################


################################ Extensibility #################################

## The loader thumbor should use to load the original image. This must be the
## full name of a python module (python must be able to import it)
## Defaults to: thumbor.loaders.http_loader
LOADER = 'wikimedia_thumbor.loader.proxy'

## The file storage thumbor should use to store original images. This must be the
## full name of a python module (python must be able to import it)
## Defaults to: thumbor.storages.file_storage
STORAGE = 'wikimedia_thumbor.storage.request'

## The result storage thumbor should use to store generated images. This must be
## the full name of a python module (python must be able to import it)
## Defaults to: None
RESULT_STORAGE = 'wikimedia_thumbor.result_storage.swift'

## The imaging engine thumbor should use to perform image operations. This must
## be the full name of a python module (python must be able to import it)
## Defaults to: thumbor.engines.pil
ENGINE = 'wikimedia_thumbor.engine.proxy'

## The gif engine thumbor should use to perform image operations. This must be
## the full name of a python module (python must be able to import it)
## Defaults to: thumbor.engines.gif
#GIF_ENGINE = 'thumbor.engines.gif'

################################################################################


################################### Security ###################################

## The security key thumbor uses to sign image URLs
## Defaults to: MY_SECURE_KEY
#SECURITY_KEY = 'MY_SECURE_KEY'

## Indicates if the /unsafe URL should be available
## Defaults to: True
#ALLOW_UNSAFE_URL = True

## Indicates if encrypted (old style) URLs should be allowed
## Defaults to: True
#ALLOW_OLD_URLS = True

################################################################################


##################################### HTTP #####################################

## Enables automatically generated etags
## Defaults to: True
#ENABLE_ETAGS = True

################################################################################


################################### Storage ####################################

## Set maximum id length for images when stored
## Defaults to: 32
#MAX_ID_LENGTH = 32

################################################################################


################################# File Loader ##################################

## The root path where the File Loader will try to find images
## Defaults to: /tmp
#FILE_LOADER_ROOT_PATH = '/tmp'

################################################################################


################################# HTTP Loader ##################################

## The maximum number of seconds libcurl can take to connect to an image being
## loaded
## Defaults to: 5
#HTTP_LOADER_CONNECT_TIMEOUT = 5

## The maximum number of seconds libcurl can take to download an image
## Defaults to: 20
#HTTP_LOADER_REQUEST_TIMEOUT = 20

## Indicates whether libcurl should follow redirects when downloading an image
## Defaults to: True
#HTTP_LOADER_FOLLOW_REDIRECTS = True

## Indicates the number of redirects libcurl should follow when downloading an
## image
## Defaults to: 5
#HTTP_LOADER_MAX_REDIRECTS = 5

## The maximum number of simultaneous HTTP connections the loader can make before
## queuing
## Defaults to: 10
#HTTP_LOADER_MAX_CLIENTS = 10

## Indicates whether thumbor should forward the user agent of the requesting user
## Defaults to: False
#HTTP_LOADER_FORWARD_USER_AGENT = False

## Default user agent for thumbor http loader requests
## Defaults to: Thumbor/5.0.6
#HTTP_LOADER_DEFAULT_USER_AGENT = 'Thumbor/5.0.6'

## The proxy host needed to load images through
## Defaults to: None
#HTTP_LOADER_PROXY_HOST = None

## The proxy port for the proxy host
## Defaults to: None
#HTTP_LOADER_PROXY_PORT = None

## The proxy username for the proxy host
## Defaults to: None
#HTTP_LOADER_PROXY_USERNAME = None

## The proxy password for the proxy host
## Defaults to: None
#HTTP_LOADER_PROXY_PASSWORD = None

## The filename of CA certificates in PEM format
## Defaults to: None
HTTP_LOADER_CA_CERTS = '/etc/ssl/certs/ca-certificates.crt'

## The filename for client SSL key
## Defaults to: None
#HTTP_LOADER_CLIENT_KEY = None

## The filename for client SSL certificate
## Defaults to: None
#HTTP_LOADER_CLIENT_CERT = None

## If the CurlAsyncHTTPClient should be used
## Defaults to: False
#HTTP_LOADER_CURL_ASYNC_HTTP_CLIENT = False

################################################################################


################################# File Storage #################################

## Expiration in seconds for the images in the File Storage. Defaults to one
## month
## Defaults to: 2592000
STORAGE_EXPIRATION_SECONDS = 600

## Indicates whether thumbor should store the signing key for each image in the
## file storage. This allows the key to be changed and old images to still be
## properly found
## Defaults to: False
#STORES_CRYPTO_KEY_FOR_EACH_IMAGE = False

## The root path where the File Storage will try to find images
## Defaults to: /tmp/thumbor/storage
#FILE_STORAGE_ROOT_PATH = '/tmp/thumbor/storage'

################################################################################


#################################### Upload ####################################

## Max size in Kb for images uploaded to thumbor
## Aliases: MAX_SIZE
## Defaults to: 0
UPLOAD_MAX_SIZE = 1048576 # 1GB

## Indicates whether thumbor should enable File uploads
## Aliases: ENABLE_ORIGINAL_PHOTO_UPLOAD
## Defaults to: False
#UPLOAD_ENABLED = False

## The type of storage to store uploaded images with
## Aliases: ORIGINAL_PHOTO_STORAGE
## Defaults to: thumbor.storages.file_storage
#UPLOAD_PHOTO_STORAGE = 'thumbor.storages.file_storage'

## Indicates whether image deletion should be allowed
## Aliases: ALLOW_ORIGINAL_PHOTO_DELETION
## Defaults to: False
#UPLOAD_DELETE_ALLOWED = False

## Indicates whether image overwrite should be allowed
## Aliases: ALLOW_ORIGINAL_PHOTO_PUTTING
## Defaults to: False
#UPLOAD_PUT_ALLOWED = False

## Default filename for image uploaded
## Defaults to: image
#UPLOAD_DEFAULT_FILENAME = 'image'

################################################################################


############################### MongoDB Storage ################################

## MongoDB storage server host
## Defaults to: localhost
#MONGO_STORAGE_SERVER_HOST = 'localhost'

## MongoDB storage server port
## Defaults to: 27017
#MONGO_STORAGE_SERVER_PORT = 27017

## MongoDB storage server database name
## Defaults to: thumbor
#MONGO_STORAGE_SERVER_DB = 'thumbor'

## MongoDB storage image collection
## Defaults to: images
#MONGO_STORAGE_SERVER_COLLECTION = 'images'

################################################################################


################################ Redis Storage #################################

## Redis storage server host
## Defaults to: localhost
#REDIS_STORAGE_SERVER_HOST = 'localhost'

## Redis storage server port
## Defaults to: 6379
#REDIS_STORAGE_SERVER_PORT = 6379

## Redis storage database index
## Defaults to: 0
#REDIS_STORAGE_SERVER_DB = 0

## Redis storage server password
## Defaults to: None
#REDIS_STORAGE_SERVER_PASSWORD = None

## Determine if redis errors should be ignored.
## Defaults to: False
#REDIS_STORAGE_IGNORE_ERRORS = False

################################################################################


############################### Memcache Storage ###############################

## List of Memcache storage server hosts
## Defaults to: ['localhost:11211']
MEMCACHE_STORAGE_SERVERS = [
        'localhost:11211',
]


################################################################################


################################ Mixed Storage #################################

## Mixed Storage file storage. This must be the full name of a python module
## (python must be able to import it)
## Defaults to: thumbor.storages.no_storage
#MIXED_STORAGE_FILE_STORAGE = 'thumbor.storages.no_storage'

## Mixed Storage signing key storage. This must be the full name of a python
## module (python must be able to import it)
## Defaults to: thumbor.storages.no_storage
#MIXED_STORAGE_CRYPTO_STORAGE = 'thumbor.storages.no_storage'

## Mixed Storage detector information storage. This must be the full name of a
## python module (python must be able to import it)
## Defaults to: thumbor.storages.no_storage
#MIXED_STORAGE_DETECTOR_STORAGE = 'thumbor.storages.no_storage'

################################################################################


##################################### Meta #####################################

## The callback function name that should be used by the META route for JSONP
## access
## Defaults to: None
#META_CALLBACK_NAME = None

################################################################################


################################## Detection ###################################

## List of detectors that thumbor should use to find faces and/or features. All
## of them must be full names of python modules (python must be able to import
## it)
## Defaults to: []
#DETECTORS = #    [
#    ]


## The cascade file that opencv will use to detect faces
## Defaults to: haarcascade_frontalface_alt.xml
#FACE_DETECTOR_CASCADE_FILE = 'haarcascade_frontalface_alt.xml'

################################################################################


################################## Optimizers ##################################

## List of optimizers that thumbor will use to optimize images
## Defaults to: []
OPTIMIZERS = [
    'wikimedia_thumbor.optimizer.exif',
]


## Path for the jpegtran binary
## Defaults to: /usr/bin/jpegtran
JPEGTRAN_PATH = '/usr/bin/jpegtran'

## Path for the ffmpeg binary used to generate gifv(h.264)
## Defaults to: /usr/local/bin/ffmpeg
FFMPEG_PATH = '/usr/bin/ffmpeg'

################################################################################


################################### Filters ####################################

## List of filters that thumbor will allow to be used in generated images. All of
## them must be full names of python modules (python must be able to import
## it)
## Defaults to: ['thumbor.filters.brightness', 'thumbor.filters.colorize', 'thumbor.filters.contrast', 'thumbor.filters.rgb', 'thumbor.filters.round_corner', 'thumbor.filters.quality', 'thumbor.filters.noise', 'thumbor.filters.watermark', 'thumbor.filters.equalize', 'thumbor.filters.fill', 'thumbor.filters.sharpen', 'thumbor.filters.strip_icc', 'thumbor.filters.frame', 'thumbor.filters.grayscale', 'thumbor.filters.rotate', 'thumbor.filters.format', 'thumbor.filters.max_bytes', 'thumbor.filters.convolution', 'thumbor.filters.blur', 'thumbor.filters.extract_focal', 'thumbor.filters.no_upscale', 'thumbor.filters.saturation', 'thumbor.filters.max_age', 'thumbor.filters.curve']
FILTERS = [
    'wikimedia_thumbor.filter.conditional_sharpen',
    'wikimedia_thumbor.filter.page',
    'thumbor.filters.quality'
]


################################################################################


################################ Result Storage ################################

## Expiration in seconds of generated images in the result storage
## Defaults to: 0
#RESULT_STORAGE_EXPIRATION_SECONDS = 0

## Path where the Result storage will store generated images
## Defaults to: /tmp/thumbor/result_storage
#RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = '/tmp/thumbor/result_storage'

## Indicates whether unsafe requests should also be stored in the Result Storage
## Defaults to: False
RESULT_STORAGE_STORES_UNSAFE = True

################################################################################


############################ Queued Redis Detector #############################

## Server host for the queued redis detector
## Defaults to: localhost
#REDIS_QUEUE_SERVER_HOST = 'localhost'

## Server port for the queued redis detector
## Defaults to: 6379
#REDIS_QUEUE_SERVER_PORT = 6379

## Server database index for the queued redis detector
## Defaults to: 0
#REDIS_QUEUE_SERVER_DB = 0

## Server password for the queued redis detector
## Defaults to: None
#REDIS_QUEUE_SERVER_PASSWORD = None

################################################################################


############################# Queued SQS Detector ##############################

## AWS key id
## Defaults to: None
#SQS_QUEUE_KEY_ID = None

## AWS key secret
## Defaults to: None
#SQS_QUEUE_KEY_SECRET = None

## AWS SQS region
## Defaults to: us-east-1
#SQS_QUEUE_REGION = 'us-east-1'

################################################################################


#################################### Errors ####################################

## This configuration indicates whether thumbor should use a custom error
## handler.
## Defaults to: False
USE_CUSTOM_ERROR_HANDLING = True

## Error reporting module. Needs to contain a class called ErrorHandler with a
## handle_error(context, handler, exception) method.
## Defaults to: thumbor.error_handlers.sentry
ERROR_HANDLER_MODULE = 'thumbor.error_handlers.sentry'

## File of error log as json
## Defaults to: None
#ERROR_FILE_LOGGER = None

## File of error log name is parametrized with context attribute
## Defaults to: False
#ERROR_FILE_NAME_USE_CONTEXT = False

################################################################################


############################### Errors - Sentry ################################

## Sentry thumbor project dsn. i.e.: http://5a63d58ae7b94f1dab3dee740b301d6a:73ee
## a45d3e8649239a973087e8f21f98@localhost:9000/2
## Defaults to:
<% if scope.function_file_exists([@sentry_dsn_file]) -%>
SENTRY_DSN_URL = '<%= scope.function_file([@sentry_dsn_file]) %>'
<% end -%>

################################################################################


################################## Extensions ##################################

QUALITY_LOW = 40
DEFAULT_FILTERS_JPEG = 'conditional_sharpen(0.6,0.01,false,0.85)'

COMMUNITY_EXTENSIONS = [
    'wikimedia_thumbor.handler.multi',
    'wikimedia_thumbor.handler.images'
]

EXIFTOOL_PATH = '/usr/bin/exiftool'
EXIF_FIELDS_TO_KEEP = [ 'Artist', 'Copyright', 'Description', 'icc_profile' ]
EXIF_TINYRGB_PATH = '/srv/thumbor/tinyrgb.icc'
EXIF_TINYRGB_ICC_REPLACE = 'IEC 61966-2.1 Default RGB colour space - sRGB'
<commit_msg>Set chroma subsampling to 4:2:0<commit_after>#####################################################################
### THIS FILE IS MANAGED BY PUPPET
#####################################################################

################################### Logging ####################################

## Logging configuration as json
## Defaults to: None
#THUMBOR_LOG_CONFIG = None

## Log Format to be used by thumbor when writing log messages.
## Defaults to: %(asctime)s %(name)s:%(levelname)s %(message)s
#THUMBOR_LOG_FORMAT = '%(asctime)s %(name)s:%(levelname)s %(message)s'

## Date Format to be used by thumbor when writing log messages.
## Defaults to: %Y-%m-%d %H:%M:%S
#THUMBOR_LOG_DATE_FORMAT = '%Y-%m-%d %H:%M:%S'

## Host to send statsd instrumentation to
## Defaults to: None
STATSD_HOST = '<%= @statsd_host %>'

## Port to send statsd instrumentation to
## Defaults to: None
STATSD_PORT = <%= @statsd_port.to_i %>

## Prefix for statsd
## Defaults to: None
STATSD_PREFIX = '<%= @statsd_prefix %>'

################################################################################


################################### Imaging ####################################

## Max width in pixels for images read or generated by thumbor
## Defaults to: 0
#MAX_WIDTH = 0

## Max height in pixels for images read or generated by thumbor
## Defaults to: 0
#MAX_HEIGHT = 0

## Min width in pixels for images read or generated by thumbor
## Defaults to: 1
#MIN_WIDTH = 1

## Min width in pixels for images read or generated by thumbor
## Defaults to: 1
#MIN_HEIGHT = 1

## Allowed domains for the http loader to download. These are regular
## expressions.
## Defaults to: []
#ALLOWED_SOURCES = #    [
#    ]


## Quality index used for generated JPEG images
## Defaults to: 80
QUALITY = 87

## Exports JPEG images with the `progressive` flag set.
## Defaults to: True
#PROGRESSIVE_JPEG = True

## Quality index used for generated WebP images. If not set (None) the same level
## of JPEG quality will be used.
## Defaults to: None
#WEBP_QUALITY = None

## Specifies whether WebP format should be used automatically if the request
## accepts it (via Accept header)
## Defaults to: False
#AUTO_WEBP = False

## Max AGE sent as a header for the image served by thumbor in seconds
## Defaults to: 86400
MAX_AGE = 31536000

## Indicates the Max AGE header in seconds for temporary images (images with
## failed smart detection)
## Defaults to: 0
#MAX_AGE_TEMP_IMAGE = 0

## Indicates whether thumbor should rotate images that have an Orientation EXIF
## header
## Defaults to: False
RESPECT_ORIENTATION = True

## Ignore errors during smart detections and return image as a temp image (not
## saved in result storage and with MAX_AGE_TEMP_IMAGE age)
## Defaults to: False
#IGNORE_SMART_ERRORS = False

## Sends If-Modified-Since & Last-Modified headers; requires support from result
## storage
## Defaults to: False
#SEND_IF_MODIFIED_LAST_MODIFIED_HEADERS = False

## Preserves exif information in generated images. Increases image size in
## kbytes, use with caution.
## Defaults to: False
PRESERVE_EXIF_INFO = True

## Indicates whether thumbor should enable the EXPERIMENTAL support for animated
## gifs.
## Defaults to: True
#ALLOW_ANIMATED_GIFS = True

## Indicates whether thumbor should use gifsicle engine. Please note that smart
## cropping and filters are not supported for gifs using gifsicle (but won't
## give an error).
## Defaults to: False
USE_GIFSICLE_ENGINE = True

## Indicates whether thumbor should enable blacklist functionality to prevent
## processing certain images.
## Defaults to: False
#USE_BLACKLIST = False

## Size of the thread pool used for image transformations.  The default value is
## 0 (don't use a threadpoool.  Increase this if you are seeing your IOLoop
## getting blocked (often indicated by your upstream HTTP requests timing out)
## Defaults to: 0
#ENGINE_THREADPOOL_SIZE = 0

################################################################################


################################ Extensibility #################################

## The loader thumbor should use to load the original image. This must be the
## full name of a python module (python must be able to import it)
## Defaults to: thumbor.loaders.http_loader
LOADER = 'wikimedia_thumbor.loader.proxy'

## The file storage thumbor should use to store original images. This must be the
## full name of a python module (python must be able to import it)
## Defaults to: thumbor.storages.file_storage
STORAGE = 'wikimedia_thumbor.storage.request'

## The result storage thumbor should use to store generated images. This must be
## the full name of a python module (python must be able to import it)
## Defaults to: None
RESULT_STORAGE = 'wikimedia_thumbor.result_storage.swift'

## The imaging engine thumbor should use to perform image operations. This must
## be the full name of a python module (python must be able to import it)
## Defaults to: thumbor.engines.pil
ENGINE = 'wikimedia_thumbor.engine.proxy'

## The gif engine thumbor should use to perform image operations. This must be
## the full name of a python module (python must be able to import it)
## Defaults to: thumbor.engines.gif
#GIF_ENGINE = 'thumbor.engines.gif'

################################################################################


################################### Security ###################################

## The security key thumbor uses to sign image URLs
## Defaults to: MY_SECURE_KEY
#SECURITY_KEY = 'MY_SECURE_KEY'

## Indicates if the /unsafe URL should be available
## Defaults to: True
#ALLOW_UNSAFE_URL = True

## Indicates if encrypted (old style) URLs should be allowed
## Defaults to: True
#ALLOW_OLD_URLS = True

################################################################################


##################################### HTTP #####################################

## Enables automatically generated etags
## Defaults to: True
#ENABLE_ETAGS = True

################################################################################


################################### Storage ####################################

## Set maximum id length for images when stored
## Defaults to: 32
#MAX_ID_LENGTH = 32

################################################################################


################################# File Loader ##################################

## The root path where the File Loader will try to find images
## Defaults to: /tmp
#FILE_LOADER_ROOT_PATH = '/tmp'

################################################################################


################################# HTTP Loader ##################################

## The maximum number of seconds libcurl can take to connect to an image being
## loaded
## Defaults to: 5
#HTTP_LOADER_CONNECT_TIMEOUT = 5

## The maximum number of seconds libcurl can take to download an image
## Defaults to: 20
#HTTP_LOADER_REQUEST_TIMEOUT = 20

## Indicates whether libcurl should follow redirects when downloading an image
## Defaults to: True
#HTTP_LOADER_FOLLOW_REDIRECTS = True

## Indicates the number of redirects libcurl should follow when downloading an
## image
## Defaults to: 5
#HTTP_LOADER_MAX_REDIRECTS = 5

## The maximum number of simultaneous HTTP connections the loader can make before
## queuing
## Defaults to: 10
#HTTP_LOADER_MAX_CLIENTS = 10

## Indicates whether thumbor should forward the user agent of the requesting user
## Defaults to: False
#HTTP_LOADER_FORWARD_USER_AGENT = False

## Default user agent for thumbor http loader requests
## Defaults to: Thumbor/5.0.6
#HTTP_LOADER_DEFAULT_USER_AGENT = 'Thumbor/5.0.6'

## The proxy host needed to load images through
## Defaults to: None
#HTTP_LOADER_PROXY_HOST = None

## The proxy port for the proxy host
## Defaults to: None
#HTTP_LOADER_PROXY_PORT = None

## The proxy username for the proxy host
## Defaults to: None
#HTTP_LOADER_PROXY_USERNAME = None

## The proxy password for the proxy host
## Defaults to: None
#HTTP_LOADER_PROXY_PASSWORD = None

## The filename of CA certificates in PEM format
## Defaults to: None
HTTP_LOADER_CA_CERTS = '/etc/ssl/certs/ca-certificates.crt'

## The filename for client SSL key
## Defaults to: None
#HTTP_LOADER_CLIENT_KEY = None

## The filename for client SSL certificate
## Defaults to: None
#HTTP_LOADER_CLIENT_CERT = None

## If the CurlAsyncHTTPClient should be used
## Defaults to: False
#HTTP_LOADER_CURL_ASYNC_HTTP_CLIENT = False

################################################################################


################################# File Storage #################################

## Expiration in seconds for the images in the File Storage. Defaults to one
## month
## Defaults to: 2592000
STORAGE_EXPIRATION_SECONDS = 600

## Indicates whether thumbor should store the signing key for each image in the
## file storage. This allows the key to be changed and old images to still be
## properly found
## Defaults to: False
#STORES_CRYPTO_KEY_FOR_EACH_IMAGE = False

## The root path where the File Storage will try to find images
## Defaults to: /tmp/thumbor/storage
#FILE_STORAGE_ROOT_PATH = '/tmp/thumbor/storage'

################################################################################


#################################### Upload ####################################

## Max size in Kb for images uploaded to thumbor
## Aliases: MAX_SIZE
## Defaults to: 0
UPLOAD_MAX_SIZE = 1048576 # 1GB

## Indicates whether thumbor should enable File uploads
## Aliases: ENABLE_ORIGINAL_PHOTO_UPLOAD
## Defaults to: False
#UPLOAD_ENABLED = False

## The type of storage to store uploaded images with
## Aliases: ORIGINAL_PHOTO_STORAGE
## Defaults to: thumbor.storages.file_storage
#UPLOAD_PHOTO_STORAGE = 'thumbor.storages.file_storage'

## Indicates whether image deletion should be allowed
## Aliases: ALLOW_ORIGINAL_PHOTO_DELETION
## Defaults to: False
#UPLOAD_DELETE_ALLOWED = False

## Indicates whether image overwrite should be allowed
## Aliases: ALLOW_ORIGINAL_PHOTO_PUTTING
## Defaults to: False
#UPLOAD_PUT_ALLOWED = False

## Default filename for image uploaded
## Defaults to: image
#UPLOAD_DEFAULT_FILENAME = 'image'

################################################################################


############################### MongoDB Storage ################################

## MongoDB storage server host
## Defaults to: localhost
#MONGO_STORAGE_SERVER_HOST = 'localhost'

## MongoDB storage server port
## Defaults to: 27017
#MONGO_STORAGE_SERVER_PORT = 27017

## MongoDB storage server database name
## Defaults to: thumbor
#MONGO_STORAGE_SERVER_DB = 'thumbor'

## MongoDB storage image collection
## Defaults to: images
#MONGO_STORAGE_SERVER_COLLECTION = 'images'

################################################################################


################################ Redis Storage #################################

## Redis storage server host
## Defaults to: localhost
#REDIS_STORAGE_SERVER_HOST = 'localhost'

## Redis storage server port
## Defaults to: 6379
#REDIS_STORAGE_SERVER_PORT = 6379

## Redis storage database index
## Defaults to: 0
#REDIS_STORAGE_SERVER_DB = 0

## Redis storage server password
## Defaults to: None
#REDIS_STORAGE_SERVER_PASSWORD = None

## Determine if redis errors should be ignored.
## Defaults to: False
#REDIS_STORAGE_IGNORE_ERRORS = False

################################################################################


############################### Memcache Storage ###############################

## List of Memcache storage server hosts
## Defaults to: ['localhost:11211']
MEMCACHE_STORAGE_SERVERS = [
        'localhost:11211',
]


################################################################################


################################ Mixed Storage #################################

## Mixed Storage file storage. This must be the full name of a python module
## (python must be able to import it)
## Defaults to: thumbor.storages.no_storage
#MIXED_STORAGE_FILE_STORAGE = 'thumbor.storages.no_storage'

## Mixed Storage signing key storage. This must be the full name of a python
## module (python must be able to import it)
## Defaults to: thumbor.storages.no_storage
#MIXED_STORAGE_CRYPTO_STORAGE = 'thumbor.storages.no_storage'

## Mixed Storage detector information storage. This must be the full name of a
## python module (python must be able to import it)
## Defaults to: thumbor.storages.no_storage
#MIXED_STORAGE_DETECTOR_STORAGE = 'thumbor.storages.no_storage'

################################################################################


##################################### Meta #####################################

## The callback function name that should be used by the META route for JSONP
## access
## Defaults to: None
#META_CALLBACK_NAME = None

################################################################################


################################## Detection ###################################

## List of detectors that thumbor should use to find faces and/or features. All
## of them must be full names of python modules (python must be able to import
## it)
## Defaults to: []
#DETECTORS = #    [
#    ]


## The cascade file that opencv will use to detect faces
## Defaults to: haarcascade_frontalface_alt.xml
#FACE_DETECTOR_CASCADE_FILE = 'haarcascade_frontalface_alt.xml'

################################################################################


################################## Optimizers ##################################

## List of optimizers that thumbor will use to optimize images
## Defaults to: []
OPTIMIZERS = [
    'wikimedia_thumbor.optimizer.exif',
]


## Path for the jpegtran binary
## Defaults to: /usr/bin/jpegtran
JPEGTRAN_PATH = '/usr/bin/jpegtran'

## Path for the ffmpeg binary used to generate gifv(h.264)
## Defaults to: /usr/local/bin/ffmpeg
FFMPEG_PATH = '/usr/bin/ffmpeg'

################################################################################


################################### Filters ####################################

## List of filters that thumbor will allow to be used in generated images. All of
## them must be full names of python modules (python must be able to import
## it)
## Defaults to: ['thumbor.filters.brightness', 'thumbor.filters.colorize', 'thumbor.filters.contrast', 'thumbor.filters.rgb', 'thumbor.filters.round_corner', 'thumbor.filters.quality', 'thumbor.filters.noise', 'thumbor.filters.watermark', 'thumbor.filters.equalize', 'thumbor.filters.fill', 'thumbor.filters.sharpen', 'thumbor.filters.strip_icc', 'thumbor.filters.frame', 'thumbor.filters.grayscale', 'thumbor.filters.rotate', 'thumbor.filters.format', 'thumbor.filters.max_bytes', 'thumbor.filters.convolution', 'thumbor.filters.blur', 'thumbor.filters.extract_focal', 'thumbor.filters.no_upscale', 'thumbor.filters.saturation', 'thumbor.filters.max_age', 'thumbor.filters.curve']
FILTERS = [
    'wikimedia_thumbor.filter.conditional_sharpen',
    'wikimedia_thumbor.filter.page',
    'thumbor.filters.quality'
]


################################################################################


################################ Result Storage ################################

## Expiration in seconds of generated images in the result storage
## Defaults to: 0
#RESULT_STORAGE_EXPIRATION_SECONDS = 0

## Path where the Result storage will store generated images
## Defaults to: /tmp/thumbor/result_storage
#RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = '/tmp/thumbor/result_storage'

## Indicates whether unsafe requests should also be stored in the Result Storage
## Defaults to: False
RESULT_STORAGE_STORES_UNSAFE = True

################################################################################


############################ Queued Redis Detector #############################

## Server host for the queued redis detector
## Defaults to: localhost
#REDIS_QUEUE_SERVER_HOST = 'localhost'

## Server port for the queued redis detector
## Defaults to: 6379
#REDIS_QUEUE_SERVER_PORT = 6379

## Server database index for the queued redis detector
## Defaults to: 0
#REDIS_QUEUE_SERVER_DB = 0

## Server password for the queued redis detector
## Defaults to: None
#REDIS_QUEUE_SERVER_PASSWORD = None

################################################################################


############################# Queued SQS Detector ##############################

## AWS key id
## Defaults to: None
#SQS_QUEUE_KEY_ID = None

## AWS key secret
## Defaults to: None
#SQS_QUEUE_KEY_SECRET = None

## AWS SQS region
## Defaults to: us-east-1
#SQS_QUEUE_REGION = 'us-east-1'

################################################################################


#################################### Errors ####################################

## This configuration indicates whether thumbor should use a custom error
## handler.
## Defaults to: False
USE_CUSTOM_ERROR_HANDLING = True

## Error reporting module. Needs to contain a class called ErrorHandler with a
## handle_error(context, handler, exception) method.
## Defaults to: thumbor.error_handlers.sentry
ERROR_HANDLER_MODULE = 'thumbor.error_handlers.sentry'

## File of error log as json
## Defaults to: None
#ERROR_FILE_LOGGER = None

## File of error log name is parametrized with context attribute
## Defaults to: False
#ERROR_FILE_NAME_USE_CONTEXT = False

################################################################################


############################### Errors - Sentry ################################

## Sentry thumbor project dsn. i.e.: http://5a63d58ae7b94f1dab3dee740b301d6a:73ee
## a45d3e8649239a973087e8f21f98@localhost:9000/2
## Defaults to:
<% if scope.function_file_exists([@sentry_dsn_file]) -%>
SENTRY_DSN_URL = '<%= scope.function_file([@sentry_dsn_file]) %>'
<% end -%>

################################################################################


################################## Extensions ##################################

CHROMA_SUBSAMPLING = '4:2:0'
QUALITY_LOW = 40
DEFAULT_FILTERS_JPEG = 'conditional_sharpen(0.6,0.01,false,0.85)'

COMMUNITY_EXTENSIONS = [
    'wikimedia_thumbor.handler.multi',
    'wikimedia_thumbor.handler.images'
]

EXIFTOOL_PATH = '/usr/bin/exiftool'
EXIF_FIELDS_TO_KEEP = [ 'Artist', 'Copyright', 'Description', 'icc_profile' ]
EXIF_TINYRGB_PATH = '/srv/thumbor/tinyrgb.icc'
EXIF_TINYRGB_ICC_REPLACE = 'IEC 61966-2.1 Default RGB colour space - sRGB'

{'fraction_non_alphanumeric': 0.2657519358782774, 'fraction_numerical': 0.009944301046053525, 'mean_word_length': 6.256703470031546, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '928527', 'n_tokens_mistral': 10652, 'n_tokens_neox': 10183, 'n_words': 3328}