From 046545983f0864b62e883105955717cbf298561c Mon Sep 17 00:00:00 2001 From: "M. Umar Shahbaz" <68814294+KingHowler@users.noreply.github.com> Date: Sat, 14 Sep 2024 02:44:42 +0500 Subject: [PATCH] Fixed .webp src creation for svg and other files (#2698) Added a default srcset in case extension is other than the following: - .jpg - .jpeg - .png - .tiff - .gif fixed #2660 --- _includes/figure.liquid | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/_includes/figure.liquid b/_includes/figure.liquid index 7c10854..461e27a 100644 --- a/_includes/figure.liquid +++ b/_includes/figure.liquid @@ -1,4 +1,6 @@ {% assign img_path = include.path | remove: '.jpg' | remove: '.jpeg' | remove: '.png' | remove: '.tiff' | remove: '.gif' %} +{% assign parts = include.path | split: '.' %} +{% assign ext = parts.last %}
{% endif %}