fix(images): Clean up image paths, compress large images, and fix openinary URLs

This commit is contained in:
Mustafa Yildiz
2026-07-18 19:28:38 +03:00
parent be94aa5155
commit f4abe0bc5b
204 changed files with 474 additions and 169 deletions
+8
View File
@@ -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("/")}`;
};