Add documentation for FORCE_WEBP
This commit is contained in:
parent
de49f1c647
commit
ceabddc972
|
@ -23,6 +23,7 @@ It's read-only and works without JavaScript. Images and albums can be viewed wit
|
||||||
- Albums
|
- Albums
|
||||||
- User page
|
- User page
|
||||||
- Tag page
|
- Tag page
|
||||||
|
- Bandwidth efficient - automatically use WebP with the `FORCE_WEBP` environment variable
|
||||||
|
|
||||||
Some things left to implement (contributions welcome!):
|
Some things left to implement (contributions welcome!):
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
"codeberg.org/video-prize-ranch/rimgo/utils"
|
"codeberg.org/video-prize-ranch/rimgo/utils"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
@ -13,5 +15,6 @@ func HandleFrontpage(c *fiber.Ctx) error {
|
||||||
return c.Render("frontpage", fiber.Map{
|
return c.Render("frontpage", fiber.Map{
|
||||||
"proto": c.Protocol(),
|
"proto": c.Protocol(),
|
||||||
"domain": c.Hostname(),
|
"domain": c.Hostname(),
|
||||||
|
"force_webp": os.Getenv("FORCE_WEBP"),
|
||||||
})
|
})
|
||||||
}
|
}
|
|
@ -43,6 +43,10 @@
|
||||||
|
|
||||||
<p>Just replace imgur.com or i.imgur.com with <code>{{domain}}</code>! You can setup automatic redirects using <a
|
<p>Just replace imgur.com or i.imgur.com with <code>{{domain}}</code>! You can setup automatic redirects using <a
|
||||||
href="https://github.com/libredirect/libredirect">LibRedirect</a> (recommended) or <a href="https://github.com/einaregilsson/Redirector">Redirector</a>.</p>
|
href="https://github.com/libredirect/libredirect">LibRedirect</a> (recommended) or <a href="https://github.com/einaregilsson/Redirector">Redirector</a>.</p>
|
||||||
|
<br>
|
||||||
|
{{#if force_webp}}
|
||||||
|
<p>To download images as their original filetype, add <code>?no_webp=1</code> to the end of the image URL.</p>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<details>
|
<details>
|
||||||
|
|
Loading…
Reference in New Issue