Skip to content

Commit b188b4c

Browse files
committed
Add image media function to settings
1 parent df72caa commit b188b4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Models/Settings.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ public function getImageUrl(string $collection, ?string $conversion = null): ?st
154154
return $this->getFirstMediaUrl($collection, $conversion);
155155
}
156156

157+
public function getImage(string $collection, $filters = []): ?Media
158+
{
159+
return $this->getFirstMedia($collection, $filters);
160+
}
161+
157162
/**
158163
* Returns the first media for the given collection. First, we check if there is a locale specific version.
159164
*/

0 commit comments

Comments
 (0)