mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 14:03:16 +00:00
Update ImageOptimizePipeline
This commit is contained in:
parent
ff15e0eed1
commit
8e5bdf6368
3 changed files with 9 additions and 0 deletions
|
@ -41,6 +41,9 @@ class ImageResize implements ShouldQueue
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$media = $this->media;
|
$media = $this->media;
|
||||||
|
if(!$media) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$path = storage_path('app/'.$media->media_path);
|
$path = storage_path('app/'.$media->media_path);
|
||||||
if (!is_file($path)) {
|
if (!is_file($path)) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -42,6 +42,9 @@ class ImageThumbnail implements ShouldQueue
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$media = $this->media;
|
$media = $this->media;
|
||||||
|
if(!$media) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$path = storage_path('app/'.$media->media_path);
|
$path = storage_path('app/'.$media->media_path);
|
||||||
if (!is_file($path)) {
|
if (!is_file($path)) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -48,6 +48,9 @@ class ImageUpdate implements ShouldQueue
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$media = $this->media;
|
$media = $this->media;
|
||||||
|
if(!$media) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$path = storage_path('app/'.$media->media_path);
|
$path = storage_path('app/'.$media->media_path);
|
||||||
$thumb = storage_path('app/'.$media->thumbnail_path);
|
$thumb = storage_path('app/'.$media->thumbnail_path);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue