diff --git a/files/assets/js/core.js b/files/assets/js/core.js
index b5b3b0d38d..e9b30ff54a 100644
--- a/files/assets/js/core.js
+++ b/files/assets/js/core.js
@@ -215,8 +215,8 @@ function expandImage(url) {
url = e.target.dataset.src
if (!url) url = e.target.src
}
- document.getElementById("desktop-expanded-image").src = url;
- document.getElementById("desktop-expanded-image-wrap-link").href = url;
+ document.getElementById("desktop-expanded-image").src = url.replace("200w.webp", "giphy.webp");
+ document.getElementById("desktop-expanded-image-wrap-link").href = url.replace("200w.webp", "giphy.webp");
bootstrap.Modal.getOrCreateInstance(document.getElementById('expandImageModal')).show();
};
diff --git a/files/assets/js/gif_modal.js b/files/assets/js/gif_modal.js
index f8e1291f2e..844c18c5ca 100644
--- a/files/assets/js/gif_modal.js
+++ b/files/assets/js/gif_modal.js
@@ -46,75 +46,75 @@ async function getGifs(form) {
container.innerHTML = `
-
![](https://media.giphy.com/media/wGhYz3FHaRJgk/giphy.webp)
+
-
![](https://media.giphy.com/media/O5NyCibf93upy/giphy.webp)
+
-
![](https://media.giphy.com/media/3o7btPCcdNniyf0ArS/giphy.webp)
+
-
![](https://media.giphy.com/media/ISOckXUybVfQ4/giphy.webp)
+
-
![](https://media.giphy.com/media/XR9Dp54ZC4dji/giphy.webp)
+
-
![](https://media.giphy.com/media/3ohzdIuqJoo8QdKlnW/giphy.webp)
+
-
![](https://media.giphy.com/media/J336VCs1JC42zGRhjH/giphy.webp)
+
-
![](https://media.giphy.com/media/1zSz5MVw4zKg0/giphy.webp)
+
-
![](https://media.giphy.com/media/4N1wOi78ZGzSB6H7vK/giphy.webp)
+
-
![](https://media.giphy.com/media/qUIm5wu6LAAog/giphy.webp)
+
-
![](https://media.giphy.com/media/bEVKYB487Lqxy/giphy.webp)
+
-
![](https://media.giphy.com/media/12Pb87uq0Vwq2c/giphy.webp)
+
-
![](https://media.giphy.com/media/unFLKoAV3TkXe/giphy.webp)
+
-
![](https://media.giphy.com/media/1jDvQyhGd3L2g/giphy.webp)
+
-
![](https://media.giphy.com/media/3o72F8t9TDi2xVnxOE/giphy.webp)
+
-
![](https://media.giphy.com/media/1M9fmo1WAFVK0/giphy.webp)
+
-
![](https://media.giphy.com/media/pVAMI8QYM42n6/giphy.webp)
+
-
![](https://media.giphy.com/media/xT77XTpyEzJ4OJO06c/giphy.webp)
+
`
}
@@ -142,7 +142,7 @@ async function searchGifs(searchTerm) {
}
else {
for (let i = 0; i < 48; i++) {
- gifURL[i] = "https://media.giphy.com/media/" + data[i].id + "/giphy.webp";
+ gifURL[i] = "https://media.giphy.com/media/" + data[i].id + "/200w.webp";
const insert = `
`
container.insertAdjacentHTML('beforeend', insert);
noGIFs.innerHTML = null;
diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py
index 1250a92fdf..d8a2907be0 100644
--- a/files/helpers/sanitize.py
+++ b/files/helpers/sanitize.py
@@ -476,7 +476,8 @@ def normalize_url(url):
.replace("https://nitter.net/", "https://twitter.com/") \
.replace("https://nitter.42l.fr/", "https://twitter.com/") \
.replace("https://nitter.lacontrevoie.fr/", "https://twitter.com/") \
- .replace("/giphy.gif", "/giphy.webp")
+ .replace("/giphy.gif", "/200w.webp") \
+ .replace("/giphy.webp", "/200w.webp") \
url = imgur_regex.sub(r'\1_d.webp?maxwidth=9999&fidelity=grand', url)
url = giphy_regex.sub(r'\1.webp', url)