mirror of https://github.com/LemmyNet/lemmy.git
pict-rs v2
parent
e61c3f0de3
commit
08588c873a
|
@ -40,7 +40,7 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
pictrs:
|
pictrs:
|
||||||
image: asonix/pictrs:v0.1.13-r0
|
image: asonix/pictrs:v0.2.0-alpha.8-r0
|
||||||
ports:
|
ports:
|
||||||
- "8537:8080"
|
- "8537:8080"
|
||||||
user: 991:991
|
user: 991:991
|
||||||
|
|
|
@ -37,7 +37,7 @@ services:
|
||||||
- lemmy
|
- lemmy
|
||||||
|
|
||||||
pictrs:
|
pictrs:
|
||||||
image: asonix/pictrs:v0.1.13-r0
|
image: asonix/pictrs:v0.2.0-alpha.8-r0
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8537:8080"
|
- "127.0.0.1:8537:8080"
|
||||||
user: 991:991
|
user: 991:991
|
||||||
|
|
|
@ -63,7 +63,7 @@ async fn full_res(
|
||||||
client: web::Data<Client>,
|
client: web::Data<Client>,
|
||||||
) -> Result<HttpResponse, Error> {
|
) -> Result<HttpResponse, Error> {
|
||||||
let url = format!(
|
let url = format!(
|
||||||
"{}/image/{}",
|
"{}/image/original/{}",
|
||||||
Settings::get().pictrs_url,
|
Settings::get().pictrs_url,
|
||||||
&filename.into_inner()
|
&filename.into_inner()
|
||||||
);
|
);
|
||||||
|
@ -78,10 +78,11 @@ async fn thumbnail(
|
||||||
let (size, file) = parts.into_inner();
|
let (size, file) = parts.into_inner();
|
||||||
|
|
||||||
let url = format!(
|
let url = format!(
|
||||||
"{}/image/thumbnail{}/{}",
|
"{}/image/process.{}?src={}&thumbnail={}",
|
||||||
Settings::get().pictrs_url,
|
Settings::get().pictrs_url,
|
||||||
|
"jpg", // this can be changed to png or webp
|
||||||
|
&file,
|
||||||
size,
|
size,
|
||||||
&file
|
|
||||||
);
|
);
|
||||||
|
|
||||||
image(url, req, client).await
|
image(url, req, client).await
|
||||||
|
|
Loading…
Reference in New Issue