Update application features and add scripts (core changes)
This commit is contained in:
@@ -35,5 +35,12 @@ export default function openinaryLoader({ src, width, quality }: { src: string,
|
||||
path = path.substring(1);
|
||||
}
|
||||
|
||||
return `https://media.ayris.tech/t/w_${width},f_webp,q_${quality || 75}/${path}`
|
||||
// Ensure 'starapart/' prefix for Openinary transform URLs
|
||||
// Since the API sometimes returns URLs without the root folder, we inject it back.
|
||||
if (!path.startsWith('starapart/') && !path.startsWith('http')) {
|
||||
path = `starapart/${path}`;
|
||||
}
|
||||
|
||||
// Adding a_auto to automatically rotate images based on EXIF data (fixes sideways phone photos)
|
||||
return `https://media.ayris.tech/t/w_${width},f_webp,q_${quality || 75},a_auto/${path}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user