use an optimized image url in getAverageColor to make it faster
All checks were successful
Deploy / deploy (push) Successful in 4m51s
All checks were successful
Deploy / deploy (push) Successful in 4m51s
This commit is contained in:
parent
918f4115b1
commit
381e4bcb86
@ -24,7 +24,7 @@ export const getAverageColor = cache(async (src: string) => {
|
|||||||
const before = performance.now();
|
const before = performance.now();
|
||||||
console.log(`Getting average color of "${src}"...`);
|
console.log(`Getting average color of "${src}"...`);
|
||||||
try {
|
try {
|
||||||
const response = await ky.get(src);
|
const response = await ky.get(`https://img.fascinated.cc/upload/w_64,h_64/${src}`);
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user