Merge pull request #13525 from annando/api-pictures

Fix images in the API
pull/13528/head
Hypolite Petovan 2023-10-10 09:16:31 -04:00 zatwierdzone przez GitHub
commit 1723aa0697
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -1012,7 +1012,7 @@ class Media
*/
public static function getPreviewUrlForId(int $id, string $size = ''): string
{
return '/photo/preview/' .
return DI::baseUrl() . '/photo/preview/' .
(Proxy::getPixelsFromSize($size) ? Proxy::getPixelsFromSize($size) . '/' : '') .
$id;
}
@ -1026,7 +1026,7 @@ class Media
*/
public static function getUrlForId(int $id, string $size = ''): string
{
return '/photo/media/' .
return DI::baseUrl() . '/photo/media/' .
(Proxy::getPixelsFromSize($size) ? Proxy::getPixelsFromSize($size) . '/' : '') .
$id;
}