feat: replace tv show icon
This commit is contained in:
@ -23,7 +23,7 @@ type ImageParams = {
|
||||
const log = createLogger("api/image");
|
||||
|
||||
async function getRemoteImage(image: string) {
|
||||
log.debug("[api/image] fetching", { image });
|
||||
log.debug("fetching", { image });
|
||||
const sourceRes = await fetch(image);
|
||||
if (!sourceRes.ok) {
|
||||
return "Error retrieving image from URL.";
|
||||
@ -68,6 +68,10 @@ function modifyImage(
|
||||
format = MagickFormat.Webp;
|
||||
}
|
||||
|
||||
if (params.mediaType === "image/png") {
|
||||
format = MagickFormat.Png;
|
||||
}
|
||||
|
||||
ImageMagick.read(imageBuffer, format, (image) => {
|
||||
const sizingData = getWidthHeight(image, params);
|
||||
if (params.mode === "resize") {
|
||||
|
Reference in New Issue
Block a user