Skip to content

[Modal Layout Picker] Request scaled Thumbnail images #2445

@chipsnyder

Description

@chipsnyder

Is your feature request related to a problem? Please describe.

This task is part of the effort to rework the Starter Page Template Picker for new pages. This part of the initiative will focus on modifying the API call /wpcom/v2/sites/{site}/block-layouts to include the parameters defined in #2416 that will allow the resulting data to include thumbnail URLs that have been optimized for the requesting client.

Goals

  • The request should include information about the screen size and resolution to satisfy Dynamically generation of screenshots for each template #2416
    • preview_width - This should be the width of the screen in pixels
    • scale- This should represent the pixel density scale.
      • iOS can use scale to fetch this data and expect 1, 2, or 3 based on the device.
      • Android can use density and expect results from 0.75, 1.0, 1.5, 2, 3, and 4
  • Thumbnails should be fetched with proper size according to device resolution/scale ( 'proper size' should be clarified before starting the implementation)
  • Thumbnails should be fetched quickly, targeting no more than 1 sec loading time for each with a normal internet connection at the first load, and almost no waiting time for second loads.
    • Consideration should be taken for using cached images for subsequent loads:
  • There should be a mechanism to generate thumbnails for new layouts at the backend but the users shouldn't be blocked by this, it should be happening behind the scenes.
  • This should handle failed image downloads and pending downloads

Additional context

Blueprint Flow - iOS
Blueprint Flow - Android

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions