]> git.mxchange.org Git - friendica.git/commitdiff
Fix images in the API
authorMichael <heluecht@pirati.ca>
Sun, 8 Oct 2023 19:49:18 +0000 (19:49 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 8 Oct 2023 19:49:18 +0000 (19:49 +0000)
src/Model/Post/Media.php

index 64f44c198d6bc2f20640c65bd1e6e82c2f9b328a..538c75091f5ae36c3a91dfb06d725dab89dac411 100644 (file)
@@ -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;
        }