diff --git a/src/utils/functions.js b/src/utils/functions.js index d1efc16..cafbe64 100644 --- a/src/utils/functions.js +++ b/src/utils/functions.js @@ -6,6 +6,7 @@ import { apiEndpoints } from './store' */ export const getThumbnail = (id, width, height, type = 'crop', quality = 75) => { const ratio = 1.5 + width = !width ? Math.round(height * ratio) : width height = !height ? Math.round(width / ratio) : height return `${apiEndpoints.rest}/assets/${id}?w=${width}&h=${height}&f=${type}&q=${quality}` }