|
|
@ -7,13 +7,10 @@ function findImage(images, coverType) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getUrl(image, coverType, size) {
|
|
|
|
function getUrl(image, coverType, size) {
|
|
|
|
if (image) {
|
|
|
|
const imageUrl = image?.url;
|
|
|
|
// Remove protocol
|
|
|
|
|
|
|
|
let url = image.url.replace(/^https?:/, '');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
url = url.replace(`${coverType}.jpg`, `${coverType}-${size}.jpg`);
|
|
|
|
if (imageUrl) {
|
|
|
|
|
|
|
|
return imageUrl.replace(`${coverType}.jpg`, `${coverType}-${size}.jpg`);
|
|
|
|
return url;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|