Skip to content

Commit

Permalink
Add default_params to config
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewHaine committed Jun 17, 2021
1 parent 954894c commit 3265e65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/imgix.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
'use_https' => true,
'include_library_param' => true,
'srcset_resolutions' => [1, 2],
'default_params' => [],
];
4 changes: 2 additions & 2 deletions src/ImgixHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function processParams(array $params = [])
$sorted = [
'path' => $params['path'] ?: "",
'html' => [],
'imgix' => [],
'imgix' => config('imgix.default_params', []),
];

// Split the `focus` parameter into fp-x, fp-y and fp-z for imgix
Expand Down Expand Up @@ -56,4 +56,4 @@ public static function processParams(array $params = [])

return $sorted;
}
}
}

0 comments on commit 3265e65

Please sign in to comment.