pdufour commited on
Commit
6bcd5a3
1 Parent(s): 152bf3c

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +1 -1
index.js CHANGED
@@ -344,7 +344,7 @@ export async function imageTextToText(
344
  async function updatePreview(url) {
345
  const image = await RawImage.fromURL(url);
346
  const ar = image.width / image.height;
347
- const [cw, ch] = (ar > 1) ? [640, 640 / ar] : [640 * ar, 640];
348
  thumb.style.width = `${cw}px`;
349
  thumb.style.height = `${ch}px`;
350
  thumb.style.backgroundImage = `url(${url})`;
 
344
  async function updatePreview(url) {
345
  const image = await RawImage.fromURL(url);
346
  const ar = image.width / image.height;
347
+ const [cw, ch] = (ar > 1) ? [320, 320 / ar] : [320 * ar, 320];
348
  thumb.style.width = `${cw}px`;
349
  thumb.style.height = `${ch}px`;
350
  thumb.style.backgroundImage = `url(${url})`;