mirror of
https://github.com/GuerillaStudio/vanillalist.git
synced 2024-12-21 08:31:55 +00:00
Serve thumbnails as webp
This commit is contained in:
parent
1acf4845cb
commit
07ac97761c
2 changed files with 8 additions and 8 deletions
|
@ -9,10 +9,10 @@ class Main {
|
||||||
const list = (await Promise.all(data.collections.plugins.map(async plugin => {
|
const list = (await Promise.all(data.collections.plugins.map(async plugin => {
|
||||||
return {
|
return {
|
||||||
...plugin,
|
...plugin,
|
||||||
image92: await this.getUrl(this.png(this.resize('./uploads/' + plugin.image, { width: 92, height: 58 }))),
|
image92: await this.getUrl(this.webp(this.resize('./uploads/' + plugin.image, { width: 92, height: 58 }))),
|
||||||
image184: await this.getUrl(this.png(this.resize('./uploads/' + plugin.image, { width: 184, height: 116 }))),
|
image184: await this.getUrl(this.webp(this.resize('./uploads/' + plugin.image, { width: 184, height: 116 }))),
|
||||||
image308: await this.getUrl(this.png(this.resize('./uploads/' + plugin.image, { width: 308, height: 195 }))),
|
image308: await this.getUrl(this.webp(this.resize('./uploads/' + plugin.image, { width: 308, height: 195 }))),
|
||||||
image616: await this.getUrl(this.png(this.resize('./uploads/' + plugin.image, { width: 616, height: 390 })))
|
image616: await this.getUrl(this.webp(this.resize('./uploads/' + plugin.image, { width: 616, height: 390 })))
|
||||||
}
|
}
|
||||||
})));
|
})));
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ class Main {
|
||||||
const list = (await Promise.all(data.plugins.map(async plugin => {
|
const list = (await Promise.all(data.plugins.map(async plugin => {
|
||||||
return card({
|
return card({
|
||||||
...plugin,
|
...plugin,
|
||||||
image92: await this.getUrl(this.png(this.resize('./uploads/' + plugin.image, { width: 92, height: 58 }))),
|
image92: await this.getUrl(this.webp(this.resize('./uploads/' + plugin.image, { width: 92, height: 58 }))),
|
||||||
image184: await this.getUrl(this.png(this.resize('./uploads/' + plugin.image, { width: 184, height: 116 }))),
|
image184: await this.getUrl(this.webp(this.resize('./uploads/' + plugin.image, { width: 184, height: 116 }))),
|
||||||
image308: await this.getUrl(this.png(this.resize('./uploads/' + plugin.image, { width: 308, height: 195 }))),
|
image308: await this.getUrl(this.webp(this.resize('./uploads/' + plugin.image, { width: 308, height: 195 }))),
|
||||||
image616: await this.getUrl(this.png(this.resize('./uploads/' + plugin.image, { width: 616, height: 390 })))
|
image616: await this.getUrl(this.webp(this.resize('./uploads/' + plugin.image, { width: 616, height: 390 })))
|
||||||
})
|
})
|
||||||
}))).join('');
|
}))).join('');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue