8 lines
293 B
JavaScript
8 lines
293 B
JavaScript
export function getThumb(imageUrl) {
|
|
if (!imageUrl) return '/image/cache/no_image-100x100.png';
|
|
const extIndex = imageUrl.lastIndexOf('.');
|
|
const ext = imageUrl.substring(extIndex);
|
|
const filename = imageUrl.substring(0, extIndex);
|
|
return `/image/cache/${filename}-100x100${ext}`;
|
|
}
|