Skip to content

Commit

Permalink
add smart_resize and rasterize to automatic preview usage
Browse files Browse the repository at this point in the history
  • Loading branch information
markvaneijk committed Mar 10, 2023
1 parent a64e614 commit fd951cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UploadcareTransformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public function getUrl(): string
// Check if url contains 'resize', 'scale_crop' or 'preview'. If not add, add 'preview' to the url.
// By using 'preview' the image will not be changed and produce the biggest possible image.
if (
preg_match('~\/(blur_region|enhance|filter|zoom_objects)\/~', $url) &&
! preg_match('~\/(preview|scale_crop|resize)\/~', $url)
preg_match('~\/(blur_region|enhance|filter|rasterize|zoom_objects)\/~', $url) &&
! preg_match('~\/(preview|scale_crop|smart_resize|resize)\/~', $url)
) {
$url .= '-/preview/';
}
Expand Down

0 comments on commit fd951cf

Please sign in to comment.