Updates response code on restricted uploads file types from 403 to 415.
Revised entrypoint script to ensure that each clustered process can access the correct amount of memory for heap.
Improve migration scripts (no functional changes).
Correct release for 12.1.0
/info/ calls now return metadata: size, lastModified, type.
/info/ calls now support non-image entities.
Patch release to fix python dependency in Docker images.
Node 18 - support for any versions except this is no longer supported.
Support for S3-compatible backends! 🎉
Please refer to the backend documentation on how to set this up.
Passes concurrency options to Darkroom
Adds/update Dockerfile
Migrates Resize and Crop to use Sharp (libvips) instead of GraphicsMagick.
Exposes gravity option for resize.
Adds /_version endpoint Fixes and improves custom response formats
Adds deletion endpoints for data and cache.
Blur is now much faster and only offers a gaussian blur
Fixes wrong dependency reference
Adds quality querystring parameter to resize Adds blurring of images
Almost complete re-write of the project including many improvements to the code, replacement of restify for express, and bugfixes.
Please see the upgrade PR for more information.
One BREAKING change has been implemented so a small change is required to the CMS, which you can see here
diff --git a/components/admin/asset/models/image.js b/components/admin/asset/models/image.js
index 3f703fb06e..fbf5aef78e 100644
--- a/components/admin/asset/models/image.js
+++ b/components/admin/asset/models/image.js
@@ -66,6 +66,7 @@ module.exports = BaseModel.extend({
type: 'POST',
url: url,
data: JSON.stringify(data),
+ headers: { 'x-darkroom-key': config.darkroom.key },
success: this.cropsReceived,
context: this,
error() {
Renames fill
to pad
and adds transparency.
Add fill
resize mode.
Add ability to download a remote image for resizing
Keeps PNGs lossless when being transcoded to WebP.
Enables WebP support by default.
This version adds support for optimised animated gifs using the gifsicle
software package
As a result, both darkroom and darkroom-api now require Gifsicle 1.91 or later for full functionality.
Without it, you will be unable to process any gifs uploaded to darkroom
Adds a new /download
endpoint to ensure the correct headers are sent to force a browser to download a file
Adds a fix for the /original
endpoint to ensure the correct cache headers are present
Adds a fix for the /original
endpoint, where meta headers would be sent after the file has begun sending.
Adds a fix for a Not Found
issue on the /info
endpoint.
Adds a fix for the clustered
module ignoring the environment variable API_PROCESSES
.
Adds the ability to request different response formats. The file name extension is used as the desired format. The allowedResponseFormats
configuration property sets what formats are allowed. If the extension does not match one of these formats, then the image will be returned in its uploaded format.
This feature could be used to increase CPU load. This needs to/will be resolved in a future version.
Now has the ability to white list upload file types. To only allow png and jpg add the following to the config.
{
upload: {
allow: ['image/png', 'image/jpeg', 'image/pjpeg']
}
}
Leaving upload/allow empty will allow any filetype to be uploaded.
{ upload: { allow: [] }
// or
{ upload: {} }
WARNING: Allowing any filetype to be upload may allow XSS vulnerabilities to be exposed on sites using darkroom.
{ upload: { allow: [ 'image/png', 'image/jpeg', 'image/pjpeg' ] } }
Major refactor to include a GridFS backend option.
This also drops the { src: 'HASH'} from upload responses. It has always been the same as id
, so was removed.
If you want to use a mongo backend, set databaseUri
in locations.js
, otherwise set it to false
.
'databaseUri': 'mongodb://localhost:27017/darkroom'
Adds circle support
As of v4.0.0 darkroom and darkroom-api require GraphicsMagick 1.3.20+ to work correctly.
It will still mostly work with GraphicsMagick 1.3.18+ but the resize({ mode: 'fit '}) will not work due to this #36
v4 will not work well with GraphicsMagick pre 1.3.18
Changes the folder structure and naming of images when uploaded and cropped.
With the previous convention of data/<hash>/image
on ext3 you have a maximum limitation of 32k images and crops within data/
. This is not so much an issue on ext4 but eventually performance will degrade.
Version 3.0.0 changes the folder structure to data/<3 char hash>/<hash>
meaning that data/
will have a maximum of 4096 sub directories.
By using the image hash for the name means that less sub directories need to be created which is an improvement gain on disk usage and memory.
-
Add a property for darkroomKey to your properties.js (or config.js)
-
Add that property to admin-properties.js
-
Update asset/lib/file-uploader.js
$el.fileupload(
to include an extra property in the options it is passed., beforeSend: function(xhr) { xhr.setRequestHeader('x-darkroom-key', properties.darkroomKey); }
- follow the instructions on upgrading from an older version to 2.1.0
- follow the instructions on upgrading from version 2.1.0 to 3.0.0
- Stop darkroom.
- Run the 2.1 to 3.0 migration script,
support/upgrade-scripts/2.1.0-to-3.0.0.sh
. Please check you have passed all necessary options.
This script will move files from data/<hash>/image
to data/<first 3 digits of hash>/<hash>
. E.g data/ef5c9d3b6a62e566536b439ebca9f952/image
to data/ef5/ef5c9d3b6a62e566536b439ebca9f952
Please note: This step is irreversible once run
This script should be executed by someone can run sudo to modify the file ownership, as changing file ownership can cause Darkroom to break when it tries to update an existing file. This step will be attempted at the end of the script.
This may take some time to complete due to the volume of disk IO required. The script will automatically ionice
itself to de-prioritise its operations to permit other system functions to continue normally.
Running without options or with -h
will show the usage message.
- Start darkroom.
Introduces significant changes to how resize works, allowing for modes to be supplied, e.g fit
, stretch
or cover