Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ababic committed Jul 5, 2024
1 parent 23a42b3 commit 1363272
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ When communicating with Bynder about configuring a new instance for compatibilit
2. A custom derivative must to be configured for image assets
3. A couple of custom derivatives must be configured for video assets


### Why are custom derivatives needed?

It is common for assets to be uploaded to a DAMS in formats that preserve as much quality as possible. For example, high-resolution uncompressed TIFF images are common for digital photography. While great for print and other media, such formats are simply overkill for most websites. Not only are images likely to be shown at much smaller dimensions in a web browser, but they are also likely to be converted to more web-friendly formats like AVIF or WebP by Wagtail, where the image quality of an uncompressed TIFF is unlikely to shine through.
Expand Down Expand Up @@ -253,6 +252,30 @@ WARNING: It's important to get this right, because if the specified derivative i
image for any reason, the ORIGINAL will be downloaded - which will lead to slow chooser response times and higher memory
usage when generating renditions.

### `BYNDER_MAX_DOCUMENT_FILE_SIZE`

Example: `10485760`

Default: `5242880`

The maximum acceptable file size (in Bytes) when downloading a 'Document' asset from Bynder. This is safety measure to guard your Wagtail project against memory spikes when file contents is loaded into memory, and can be tweaked for individual environments to reflect:

- How much RAM is available in the host infrastructure
- How large the documents are that editors want to feature in content
- Whether you are doing anything particularly memory intensive with document files (e.g. text/content analysis)

### `BYNDER_MAX_IMAGE_FILE_SIZE`

Example: `10485760`

Default: `5242880`

The maximum acceptable file size (in Bytes) when downloading an 'Image' asset from Bynder. This is safety measure to guard your Wagtail project against memory spikes when file contents is loaded into memory.

This setting is provided separately to `BYNDER_MAX_DOCUMENT_FILE_SIZE`, because it often needs to be set to a lower value, even if enough RAM is available to hold the orignal file in memory. This is because server-size image libraries have to understand the individual pixel values of the image, which often requires much more memory than that of the original contents.

As with `BYNDER_MAX_DOCUMENT_FILE_SIZE`, this can be tweaked for individual environments to reflect how much RAM is available in the host infrastructure.

### `BYNDER_VIDEO_MODEL`

Example: `"video.Video"`
Expand Down

0 comments on commit 1363272

Please sign in to comment.