Skip to content

getImage() returns low-resolution screenshots — no way to request higher resolution #152

@pampas93

Description

@pampas93

Summary

screen.getImage() returns very low-resolution screenshots. The downloaded PNGs are only ~131–207px wide × 512px tall (23–32 KB each). For a mobile screen design, this makes the output blurry and unusable for review or presentation purposes.

Reproduction

import { Stitch, StitchToolClient } from "@google/stitch-sdk";

const client = new StitchToolClient({ apiKey: process.env.STITCH_API_KEY });
const sdk = new Stitch(client);

const project = await sdk.createProject("Test");
const screen = await project.generate("A mobile dashboard for a task list app", "MOBILE");

const imageUrl = await screen.getImage();
// Download the image at imageUrl → result is ~200x512px, very low resolution

Actual dimensions of downloaded screenshots

Screen Width Height File size
Screen 1 207px 512px 24 KB
Screen 2 187px 512px 32 KB
Screen 3 161px 512px 28 KB
Screen 4 131px 512px 23 KB

What I expected

Screenshots at a usable resolution — at minimum 1x device resolution (~390×844 for iPhone), ideally 2x or 3x (780×1688 or 1170×2532).

Notes from the SDK source

The tools-manifest.json mentions that the screenshot downloadUrl is a FIFE base URL and states:

"this contains the FIFE serving_base_url which requires additional FIFE URL options to be set for sizing"

However, getImage() takes no parameters and returns the bare FIFE URL with no sizing options appended. There's no way in the SDK to request a specific resolution.

Questions

  1. Is there a way to get higher-resolution screenshots via the SDK?
  2. Can FIFE URL parameters (e.g. =w800, =s1200) be appended to the download URL to request a larger image? If so, what parameters are supported?
  3. Would the SDK accept a resolution or scale parameter on getImage() in a future release?

Environment

  • @google/stitch-sdk v0.0.3
  • Node.js v22
  • macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions