1
0
Fork 0
forked from mirror/pixelfed

Update MediaTransformers, add default blurhash attribute

This commit is contained in:
Daniel Supernault 2021-01-30 17:31:07 -07:00
parent 896452c74c
commit 3f14a4c412
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ class MediaTransformer extends Fractal\TransformerAbstract
'text_url' => null,
'meta' => null,
'description' => $media->caption,
'blurhash' => $media->blurhash
'blurhash' => $media->blurhash ?? 'U4Rfzst8?bt7ogayj[j[~pfQ9Goe%Mj[WBay'
];
if($media->width && $media->height) {

View file

@ -24,7 +24,7 @@ class MediaTransformer extends Fractal\TransformerAbstract
'filter_name' => $media->filter_name,
'filter_class' => $media->version == 1 ? $media->filter_class : null,
'mime' => $media->mime,
'blurhash' => $media->blurhash
'blurhash' => $media->blurhash ?? 'U4Rfzst8?bt7ogayj[j[~pfQ9Goe%Mj[WBay'
];
if($media->width && $media->height) {