Skip to content

Commit

Permalink
feat: use "thumbnail" from "images"
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPietrusky committed Apr 16, 2024
1 parent 8460d43 commit 10cd949
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/build-marketplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ const processDirectory = async (directory: string, catalog: any[]): Promise<void
} else if (entry.isFile() && entry.name.endsWith(".json")) {
try {
const data = JSON.parse(fs.readFileSync(fullPath, "utf8"));
const imagePath = path.join(directory, data.payload.thumbnail);
const imagePath = path.join(directory, data.payload.images.thumbnail);
const base64Image = await encodeImageToWebPBase64(imagePath);

if (base64Image) {
data.payload.thumbnail = `data:image/webp;base64,${base64Image}`;
data.payload.images.thumbnail = `data:image/webp;base64,${base64Image}`;
}

catalog.push(data);
Expand Down

0 comments on commit 10cd949

Please sign in to comment.