mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-08-25 03:55:33 -05:00
Import sharp when used
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import * as fs from 'node:fs/promises';
|
||||
import * as path from 'node:path';
|
||||
import { Request } from 'express';
|
||||
import sharp from 'sharp';
|
||||
import { CoopRule, FestVoteState, FriendOnlineState, StageScheduleResult } from 'splatnet3-types/splatnet3';
|
||||
import { dir } from '../util/product.js';
|
||||
import createDebug from '../util/debug.js';
|
||||
@@ -101,6 +100,8 @@ export async function renderUserEmbedImage(
|
||||
const start = Date.now();
|
||||
debug('generating image, format %s', PresenceEmbedFormat[format]);
|
||||
|
||||
const { default: sharp } = await import('sharp');
|
||||
|
||||
let image = sharp(Buffer.from(svg)).withMetadata({
|
||||
density: 72 * 2,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user