fix: strip existing extension from post.image before appending .webp
This commit is contained in:
+2
-2
@@ -3192,9 +3192,9 @@
|
|||||||
|
|
||||||
function postMarkup(post, index) {
|
function postMarkup(post, index) {
|
||||||
return [
|
return [
|
||||||
'<div class="news-card">',
|
'<div class="news-card">',
|
||||||
post.image ? '<img class="news-card-image" src="https://my-biz.app/content/images/blog/' +
|
post.image ? '<img class="news-card-image" src="https://my-biz.app/content/images/blog/' +
|
||||||
post.image +
|
post.image.replace(/\.[^.]+$/, '') +
|
||||||
'.webp" alt="' +
|
'.webp" alt="' +
|
||||||
post.title.replace(/"/g, """) +
|
post.title.replace(/"/g, """) +
|
||||||
'">' : '',
|
'">' : '',
|
||||||
|
|||||||
Reference in New Issue
Block a user