Skip to content

Commit 28a5b86

Browse files
authored
Implement smartFocus method in Image class
Added smartFocus method to set image gravity.
1 parent 567557f commit 28a5b86

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Resource/Image.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ public function stripMetadata(bool $stripMetadata = true): self
102102
return $this;
103103
}
104104

105+
/**
106+
* Set the smart focus gravity of the optimized image.
107+
*/
108+
public function smartFocus(){
109+
$this->addProperty(new ImageProperty\GravityProperty('sm'));
110+
return $this;
111+
}
112+
105113
/**
106114
* Apply a watermark to the optimized image.
107115
*/

0 commit comments

Comments
 (0)