From a6e655f3c8a20ff0e866dd6311337c95cd1f585e Mon Sep 17 00:00:00 2001 From: Kathy <153706637+kathayl@users.noreply.github.com> Date: Thu, 31 Jul 2025 10:53:51 -0700 Subject: [PATCH 1/4] Update browser-rendering.yaml clarify viewport is for screenshot endpoint --- src/content/release-notes/browser-rendering.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/release-notes/browser-rendering.yaml b/src/content/release-notes/browser-rendering.yaml index c754efe41015b2a..1dd7ca80e2e8a5b 100644 --- a/src/content/release-notes/browser-rendering.yaml +++ b/src/content/release-notes/browser-rendering.yaml @@ -12,7 +12,7 @@ entries: * Local development with `npx wrangler dev` now supports [Playwright](/browser-rendering/platform/playwright/) when using Browser Rendering. Upgrade to the latest version of wrangler to get started. * The [`/content` endpoint](/browser-rendering/rest-api/content-endpoint/) now returns the page's title, making it easier to identify pages. * The [`/json` endpoint](/browser-rendering/rest-api/json-endpoint/) now allows you to specify your own AI model for the extraction, using the `custom_ai` parameter. - * The default viewport size has been increased from 800x600 to 1920x1080. You can still override the viewport via request options. + * The default viewport size on the [`/screenshot` endpoint](/browser-rendering/rest-api/screenshot-endpoint/)has been increased from 800x600 to 1920x1080. You can still override the viewport via request options. - publish_date: "2025-07-25" title: "@cloudflare/puppeteer 1.0.4 released" description: |- From 70e1568d1307fdb5af20d16b4f623322b8c71af4 Mon Sep 17 00:00:00 2001 From: Kathy <153706637+kathayl@users.noreply.github.com> Date: Thu, 31 Jul 2025 10:55:53 -0700 Subject: [PATCH 2/4] Update screenshot-endpoint.mdx add what the default viewport is --- .../docs/browser-rendering/rest-api/screenshot-endpoint.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/content/docs/browser-rendering/rest-api/screenshot-endpoint.mdx b/src/content/docs/browser-rendering/rest-api/screenshot-endpoint.mdx index 66e31fd652b0900..fb99712c7814a7e 100644 --- a/src/content/docs/browser-rendering/rest-api/screenshot-endpoint.mdx +++ b/src/content/docs/browser-rendering/rest-api/screenshot-endpoint.mdx @@ -51,6 +51,9 @@ For more options to control the final screenshot, like `clip`, `captureBeyondVie :::note The `quality` parameter is not compatible with the default `.png` format and will return a 400 error. If you set `quality`, you must also set `type` to `.jpeg` or another supported format. + +By default, the browser viewport is set to **1920×1080**. You can override the default via request options. + ::: ## Advanced usage From e9ac87644e3983778345eb6b9a08502f771d2670 Mon Sep 17 00:00:00 2001 From: Kathy <153706637+kathayl@users.noreply.github.com> Date: Fri, 1 Aug 2025 11:59:54 -0700 Subject: [PATCH 3/4] Update src/content/release-notes/browser-rendering.yaml Co-authored-by: ToriLindsay --- src/content/release-notes/browser-rendering.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/release-notes/browser-rendering.yaml b/src/content/release-notes/browser-rendering.yaml index 1dd7ca80e2e8a5b..8b3f618f570b8a1 100644 --- a/src/content/release-notes/browser-rendering.yaml +++ b/src/content/release-notes/browser-rendering.yaml @@ -12,7 +12,7 @@ entries: * Local development with `npx wrangler dev` now supports [Playwright](/browser-rendering/platform/playwright/) when using Browser Rendering. Upgrade to the latest version of wrangler to get started. * The [`/content` endpoint](/browser-rendering/rest-api/content-endpoint/) now returns the page's title, making it easier to identify pages. * The [`/json` endpoint](/browser-rendering/rest-api/json-endpoint/) now allows you to specify your own AI model for the extraction, using the `custom_ai` parameter. - * The default viewport size on the [`/screenshot` endpoint](/browser-rendering/rest-api/screenshot-endpoint/)has been increased from 800x600 to 1920x1080. You can still override the viewport via request options. + * The default viewport size on the [`/screenshot` endpoint](/browser-rendering/rest-api/screenshot-endpoint/) has been increased from 800x600 to 1920x1080. You can still override the viewport via request options. - publish_date: "2025-07-25" title: "@cloudflare/puppeteer 1.0.4 released" description: |- From b9a55f969a557a4e0140615e9cd16f0a7d5e9f96 Mon Sep 17 00:00:00 2001 From: ToriLindsay Date: Mon, 4 Aug 2025 11:53:39 +0100 Subject: [PATCH 4/4] Apply suggestions from code review --- .../browser-rendering/rest-api/screenshot-endpoint.mdx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/content/docs/browser-rendering/rest-api/screenshot-endpoint.mdx b/src/content/docs/browser-rendering/rest-api/screenshot-endpoint.mdx index fb99712c7814a7e..f78f59bc92ed6e6 100644 --- a/src/content/docs/browser-rendering/rest-api/screenshot-endpoint.mdx +++ b/src/content/docs/browser-rendering/rest-api/screenshot-endpoint.mdx @@ -49,11 +49,9 @@ console.log(screenshot.status); For more options to control the final screenshot, like `clip`, `captureBeyondViewport`, `fullPage` and others, check the endpoint [reference](/api/resources/browser_rendering/subresources/screenshot/methods/create/). -:::note -The `quality` parameter is not compatible with the default `.png` format and will return a 400 error. If you set `quality`, you must also set `type` to `.jpeg` or another supported format. - -By default, the browser viewport is set to **1920×1080**. You can override the default via request options. - +:::note[Notes for basic usage] +- The `quality` parameter is not compatible with the default `.png` format and will return a 400 error. If you set `quality`, you must also set `type` to `.jpeg` or another supported format. +- By default, the browser viewport is set to **1920×1080**. You can override the default via request options. ::: ## Advanced usage