fix(images): Clean up image paths, compress large images, and fix openinary URLs
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
const OPENINARY_BASE = "https://media.ayris.tech/t/aydogan";
|
||||
|
||||
export const openinaryUrl = (path: string) => {
|
||||
if (!path || !path.startsWith("/images/")) return path;
|
||||
const parts = path.replace("/images/", "").split("/");
|
||||
const encodedParts = parts.map(part => encodeURIComponent(part));
|
||||
return `${OPENINARY_BASE}/${encodedParts.join("/")}`;
|
||||
};
|
||||
Reference in New Issue
Block a user