Support Blurhash
This commit is contained in:
parent
22e2578b23
commit
a5be5b27e3
16 changed files with 152 additions and 17 deletions
|
@ -94,7 +94,7 @@ class Attachment extends BaseFactory
|
|||
*/
|
||||
public function createFromPhoto(int $id): array
|
||||
{
|
||||
$photo = Photo::selectFirst(['resource-id', 'uid', 'id', 'title', 'type', 'width', 'height'], ['id' => $id]);
|
||||
$photo = Photo::selectFirst(['resource-id', 'uid', 'id', 'title', 'type', 'width', 'height', 'blurhash'], ['id' => $id]);
|
||||
if (empty($photo)) {
|
||||
return [];
|
||||
}
|
||||
|
@ -104,6 +104,7 @@ class Attachment extends BaseFactory
|
|||
'description' => $photo['title'],
|
||||
'width' => $photo['width'],
|
||||
'height' => $photo['height'],
|
||||
'blurhash' => $photo['blurhash'],
|
||||
];
|
||||
|
||||
$photoTypes = Images::supportedTypes();
|
||||
|
|
|
@ -74,6 +74,7 @@ class Card extends BaseFactory
|
|||
$data['image'] = $attached['preview'];
|
||||
$data['width'] = $attached['preview-width'];
|
||||
$data['height'] = $attached['preview-height'];
|
||||
$data['blurhash'] = $attached['blurhash'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue