Improve performance of placeholder images (#1325)
* Don't include updatedAt field when fetching album art placeholder. This will allow browers to cache the place holder * Apply resizing to placeholder image * Fix issues discovered by CI linter and prettier * Updates from PR review
This commit is contained in:
@@ -49,7 +49,11 @@ const getCoverArtUrl = (record, size) => {
|
||||
...(record.updatedAt && { _: record.updatedAt }),
|
||||
...(size && { size }),
|
||||
}
|
||||
return baseUrl(url('getCoverArt', record.coverArtId || 'not_found', options))
|
||||
if (record.coverArtId) {
|
||||
return baseUrl(url('getCoverArt', record.coverArtId, options))
|
||||
} else {
|
||||
return baseUrl(url('getCoverArt', 'not_found', size && { size }))
|
||||
}
|
||||
}
|
||||
|
||||
const streamUrl = (id) => {
|
||||
|
||||
Reference in New Issue
Block a user