use an optimized image url in getAverageColor to make it faster
All checks were successful
Deploy / deploy (push) Successful in 4m51s

This commit is contained in:
Lee 2024-09-30 22:51:53 +01:00
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;
} }