Skip to content

Commit

Permalink
Skip error for null focal point.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstein committed Feb 3, 2025
1 parent f4f62a5 commit fc03965
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/models/ImgproxyTransform.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ public function transform(array $params): Url
$url->options()->withResizingType($resizeType);

// focal point
if ($this->source instanceof Asset) {
$fp = $this->source->getFocalPoint();
if ($this->source instanceof Asset && $fp = $this->source->getFocalPoint()) {
$url->options()->withGravity(Gravity::FOCUS_POINT, $fp['x'], $fp['y']);
}

Expand Down

0 comments on commit fc03965

Please sign in to comment.