mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-25 22:10:47 +00:00
commit
7a234ccd4c
6 changed files with 71 additions and 58 deletions
|
@ -1,6 +1,9 @@
|
|||
# Release Notes
|
||||
|
||||
## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.11.0...dev)
|
||||
### Added
|
||||
- WebP Support ([069a0e4a](https://github.com/pixelfed/pixelfed/commit/069a0e4a))
|
||||
|
||||
### Updated
|
||||
- Updated PrettyNumber, fix deprecated warning. ([20ec870b](https://github.com/pixelfed/pixelfed/commit/20ec870b))
|
||||
- Updated landing page, use config_cache. ([54920294](https://github.com/pixelfed/pixelfed/commit/54920294))
|
||||
|
|
|
@ -26,6 +26,7 @@ trait AdminSettingsController
|
|||
$png = in_array('image/png', $types);
|
||||
$gif = in_array('image/gif', $types);
|
||||
$mp4 = in_array('video/mp4', $types);
|
||||
$webp = in_array('image/webp', $types);
|
||||
|
||||
// $system = [
|
||||
// 'permissions' => is_writable(base_path('storage')) && is_writable(base_path('bootstrap')),
|
||||
|
@ -39,6 +40,7 @@ trait AdminSettingsController
|
|||
'png',
|
||||
'gif',
|
||||
'mp4',
|
||||
'webp',
|
||||
'rules',
|
||||
'cloud_storage',
|
||||
'cloud_disk',
|
||||
|
@ -60,6 +62,7 @@ trait AdminSettingsController
|
|||
'type_png' => 'nullable',
|
||||
'type_gif' => 'nullable',
|
||||
'type_mp4' => 'nullable',
|
||||
'type_webp' => 'nullable',
|
||||
]);
|
||||
|
||||
if($request->filled('rule_delete')) {
|
||||
|
@ -83,6 +86,7 @@ trait AdminSettingsController
|
|||
'type_png' => 'image/png',
|
||||
'type_gif' => 'image/gif',
|
||||
'type_mp4' => 'video/mp4',
|
||||
'type_webp' => 'image/webp',
|
||||
];
|
||||
|
||||
foreach ($mimes as $key => $value) {
|
||||
|
|
|
@ -136,6 +136,7 @@ class ComposeController extends Controller
|
|||
switch ($media->mime) {
|
||||
case 'image/jpeg':
|
||||
case 'image/png':
|
||||
case 'image/webp':
|
||||
ImageOptimize::dispatch($media);
|
||||
break;
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ class ImageUpdate implements ShouldQueue
|
|||
protected $protectedMimes = [
|
||||
'image/jpeg',
|
||||
'image/png',
|
||||
'image/webp'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -78,6 +79,5 @@ class ImageUpdate implements ShouldQueue
|
|||
$media->save();
|
||||
|
||||
MediaStoragePipeline::dispatch($media);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,8 @@ class Image
|
|||
public $orientation;
|
||||
public $acceptedMimes = [
|
||||
'image/png',
|
||||
'image/jpeg'
|
||||
'image/jpeg',
|
||||
'image/webp'
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
|
|
|
@ -238,8 +238,12 @@
|
|||
<label class="custom-control-label" for="mediaType3"><span class="border border-dark px-1 rounded font-weight-bold">GIF</span></label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox mt-2">
|
||||
<input type="checkbox" name="type_mp4" class="custom-control-input" id="mediaType4" {{$mp4 ? 'checked' : ''}}>
|
||||
<label class="custom-control-label" for="mediaType4"><span class="border border-dark px-1 rounded font-weight-bold">MP4</span></label>
|
||||
<input type="checkbox" name="type_webp" class="custom-control-input" id="mediaType4" {{$webp ? 'checked' : ''}}>
|
||||
<label class="custom-control-label" for="mediaType4"><span class="border border-dark px-1 rounded font-weight-bold">WebP</span></label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox mt-2">
|
||||
<input type="checkbox" name="type_mp4" class="custom-control-input" id="mediaType5" {{$mp4 ? 'checked' : ''}}>
|
||||
<label class="custom-control-label" for="mediaType5"><span class="border border-dark px-1 rounded font-weight-bold">MP4</span></label>
|
||||
</div>
|
||||
<p class="help-text small text-muted mt-3 mb-0">Allowed media types.</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue