catch imgproxy pro unvailable errors

This commit is contained in:
keyan 2024-03-15 21:59:58 -05:00
parent 56c2682c9e
commit b451ecaf8c
1 changed files with 7 additions and 2 deletions

View File

@ -107,8 +107,13 @@ export const createImgproxyUrls = async (id, text, { models, forceFetch }) => {
console.log('[imgproxy] id:', id, '-- not image url:', url)
continue
}
imgproxyUrls[url] = {
dimensions: await getDimensions(fetchUrl)
imgproxyUrls[url] = {}
try {
imgproxyUrls[url] = {
dimensions: await getDimensions(fetchUrl)
}
} catch (err) {
console.log('[imgproxy] id:', id, '-- error getting dimensions (possibly not running imgproxy pro)')
}
for (const res of resolutions) {
const [w, h] = res.split('x')