Use api path to determine type (#12031)

* Use api path to determine type

* Use in both cases

* Fix extension parsing
This commit is contained in:
Nicolas Mowen
2024-06-17 14:53:35 -06:00
committed by GitHub
parent 5b60785cca
commit 4635e64b2e
4 changed files with 8 additions and 7 deletions

View File

@@ -39,7 +39,7 @@ export function PolygonCanvas({
const element = new window.Image();
element.width = width;
element.height = height;
element.src = `${apiHost}api/${camera}/latest.jpg`;
element.src = `${apiHost}api/${camera}/latest.webp`;
return element;
}
}, [camera, width, height, apiHost]);