Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Add config to optionally disable image resampling #479

Merged
merged 2 commits into from
Feb 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@ class File extends DataObject implements AssetContainer, Thumbnail, CMSPreviewab
private static $singular_name = "File";

private static $plural_name = "Files";

/**
* Control whether images in the admin will be resampled
*
* Can be turned off e.g. when using an external resampling service
* or a backend that may not support resampling.
*
* @config
* @var bool
*/
private static $resample_images = true;

/**
* Anyone with CMS access can view draft files
Expand Down