16/9 better quality parseIcon (we could technically go higher)

This commit is contained in:
xemles 2023-12-25 17:56:27 +01:00 committed by GitHub
parent 35c92189e3
commit 7c64de6f82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,6 +93,10 @@ function parseIcon($item) {
const value = img.attr('srcset') || img.data('srcset') const value = img.attr('srcset') || img.data('srcset')
const obj = value ? srcset.parse(value).find(i => i.width === 128) : {} const obj = value ? srcset.parse(value).find(i => i.width === 128) : {}
if (obj.url) {
obj.url = obj.url.replace('128x180', '960x540');
}
return obj.url return obj.url
} }