mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-12 11:06:30 +00:00
Fix video placeholder image preload
This commit is contained in:
parent
27e49376fa
commit
0ef90270b7
1 changed files with 2 additions and 1 deletions
|
@ -91,7 +91,8 @@ proc renderHead*(prefs: Prefs; cfg: Config; titleText=""; desc=""; video="";
|
||||||
link(rel="preload", type="image/png", href=bannerUrl, `as`="image")
|
link(rel="preload", type="image/png", href=bannerUrl, `as`="image")
|
||||||
|
|
||||||
for url in images:
|
for url in images:
|
||||||
let suffix = if "400x400" in url: "" else: "?name=small"
|
let suffix = if "400x400" in url or url.endsWith("placeholder.png"): ""
|
||||||
|
else: "?name=small"
|
||||||
let preloadUrl = getPicUrl(url & suffix)
|
let preloadUrl = getPicUrl(url & suffix)
|
||||||
link(rel="preload", type="image/png", href=preloadUrl, `as`="image")
|
link(rel="preload", type="image/png", href=preloadUrl, `as`="image")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue