mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Add custom image quality to config
This commit is contained in:
parent
865f852a8e
commit
774557e8c9
2 changed files with 15 additions and 4 deletions
|
@ -116,7 +116,8 @@ class Image {
|
|||
$converted = $this->setBaseName($path, $thumbnail, $img->extension);
|
||||
$newPath = storage_path('app/'.$converted['path']);
|
||||
|
||||
$img->save($newPath, 75);
|
||||
$quality = config('pixelfed.image_quality');
|
||||
$img->save($newPath, $quality);
|
||||
|
||||
if(!$thumbnail) {
|
||||
$media->orientation = $orientation;
|
||||
|
|
|
@ -86,7 +86,7 @@ return [
|
|||
|
|
||||
|
|
||||
*/
|
||||
'max_account_size' => env('MAX_ACCOUNT_SIZE', 100000),
|
||||
'max_account_size' => env('MAX_ACCOUNT_SIZE', 1000000),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -106,7 +106,7 @@ return [
|
|||
| Change the caption length limit for new local posts.
|
||||
|
|
||||
*/
|
||||
'max_caption_length' => env('MAX_CAPTION_LENGTH', 150),
|
||||
'max_caption_length' => env('MAX_CAPTION_LENGTH', 500),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -128,4 +128,14 @@ return [
|
|||
*/
|
||||
'enforce_email_verification' => env('ENFORCE_EMAIL_VERIFICATION', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Image Quality
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set the image optimization quality, must be a value between 1-100.
|
||||
|
|
||||
*/
|
||||
'image_quality' => (int) env('IMAGE_QUALITY', 80),
|
||||
|
||||
];
|
Loading…
Reference in a new issue