mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 18:01:00 +00:00
Merge branch 'asonix/pict-rs-v2' of https://github.com/asonix/lemmy into asonix-asonix/pict-rs-v2
This commit is contained in:
commit
9bbacd38f4
3 changed files with 6 additions and 5 deletions
|
@ -40,7 +40,7 @@ services:
|
|||
restart: always
|
||||
|
||||
pictrs:
|
||||
image: asonix/pictrs:v0.1.13-r0
|
||||
image: asonix/pictrs:v0.2.2-r0
|
||||
ports:
|
||||
- "8537:8080"
|
||||
user: 991:991
|
||||
|
|
|
@ -37,7 +37,7 @@ services:
|
|||
- lemmy
|
||||
|
||||
pictrs:
|
||||
image: asonix/pictrs:v0.1.13-r0
|
||||
image: asonix/pictrs:v0.2.2-r0
|
||||
ports:
|
||||
- "127.0.0.1:8537:8080"
|
||||
user: 991:991
|
||||
|
|
|
@ -63,7 +63,7 @@ async fn full_res(
|
|||
client: web::Data<Client>,
|
||||
) -> Result<HttpResponse, Error> {
|
||||
let url = format!(
|
||||
"{}/image/{}",
|
||||
"{}/image/original/{}",
|
||||
Settings::get().pictrs_url,
|
||||
&filename.into_inner()
|
||||
);
|
||||
|
@ -78,10 +78,11 @@ async fn thumbnail(
|
|||
let (size, file) = parts.into_inner();
|
||||
|
||||
let url = format!(
|
||||
"{}/image/thumbnail{}/{}",
|
||||
"{}/image/process.{}?src={}&thumbnail={}",
|
||||
Settings::get().pictrs_url,
|
||||
"jpg", // this can be changed to png or webp
|
||||
&file,
|
||||
size,
|
||||
&file
|
||||
);
|
||||
|
||||
image(url, req, client).await
|
||||
|
|
Loading…
Reference in a new issue