Skip to content

Commit

Permalink
allow edit sync in presets
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Jan 10, 2024
1 parent ca33594 commit 0400928
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Support/ResponsiveImagesConversionsPreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class ResponsiveImagesConversionsPreset
*/
public static function get(
Media $media,
string $extension = 'jpg'
string $extension = 'jpg',
bool $sync = false,
): Collection {
/**
* @var Collection<int, MediaConversion> $conversions
Expand All @@ -29,6 +30,7 @@ public static function get(

$conversions->push(new MediaConversion(
name: $name,
sync: $sync,
job: new OptimizedImageConversionJob(
media: $media,
conversion: $name,
Expand Down
4 changes: 3 additions & 1 deletion src/Support/VideoPosterConversionPreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class VideoPosterConversionPreset
public static function get(
Media $media,
bool $withResponsiveImages = false,
string $extension = 'jpg'
string $extension = 'jpg',
bool $sync = false,
): Collection {
/**
* @var Collection<int, MediaConversion> $conversions
Expand All @@ -24,6 +25,7 @@ public static function get(

$conversions->push(new MediaConversion(
name: 'poster',
sync: $sync,
job: new VideoPosterConversionJob(
media: $media,
conversion: 'poster',
Expand Down

0 comments on commit 0400928

Please sign in to comment.