From bb7731970395df182cb16cd09e09d99e56823508 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 22 Oct 2025 01:30:04 +0100 Subject: [PATCH] Update browser endpoint in avatar screenshot API to use service name for improved reliability --- app/controllers/api/avatars.php | 2 +- docs/references/avatars/get-screenshot.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 docs/references/avatars/get-screenshot.md diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 6a240cb1ff..addad2346c 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -818,7 +818,7 @@ App::get('/v1/avatars/screenshot') $config = $finalConfig; try { - $browserEndpoint = Config::getParam('_APP_BROWSER_HOST', 'http://192.168.1.43:3000/v1'); + $browserEndpoint = Config::getParam('_APP_BROWSER_HOST', 'http://appwrite-browser:3000/v1'); $fetchResponse = $client->fetch( url: $browserEndpoint . '/screenshots', diff --git a/docs/references/avatars/get-screenshot.md b/docs/references/avatars/get-screenshot.md new file mode 100644 index 0000000000..41fdf4c7c9 --- /dev/null +++ b/docs/references/avatars/get-screenshot.md @@ -0,0 +1,5 @@ +Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image. + +You can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll. + +When width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px. \ No newline at end of file