Comfy-Org / Comfy-Org/ComfyUI_frontend

fix: display original image dimensions on cloud asset cards (blocked on backend metadata)

Open
#10,590 0 comments 0 reactions 0 assignees View on GitHub
area:ui Public API
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Problem

Cloud asset card thumbnails are downscaled to max 512px via `?res=512`, so `naturalWidth`/`naturalHeight` reports the thumbnail dimensions instead of the original image size. This causes incorrect resolution display in the Assets panel.

## Current State

- **Stopgap (PR #9678)**: Moved thumbnail downscaling to the card display layer only — nodes, downloads, and lightbox now use full-res images
- **Resolution subtitle disabled on cloud**: The dimension subtitle on cloud asset cards is hidden until backend provides original dimensions via the `/assets` API (pending PR)

## Blocked On

The `/assets` API needs to return original image dimensions in its response metadata. This requires changes in:

1. **Comfy-Org/cloud**: Extract and store image dimensions during asset ingest, return in `/assets` response metadata
2. **Comfy-Org/ComfyUI**: Add image dimension extraction to the asset ingest pipeline (`metadata_extract.py`), return in `/assets` response (Luke's API alignment work in PR #12863 is relevant)

## Frontend Work (once backend is ready)

1. Update `assetSchema.ts` to parse dimension fields from `/assets` response metadata
2. Update `MediaAssetCard.vue` to use API-provided dimensions instead of `naturalWidth`/`naturalHeight`
3. Remove the `isCloud` gate on dimension display
4. Consider adopting typed `media_metadata` field for extensibility (video duration, 3D metadata, etc.)

## Context

- Slack discussion (Mar 13, 2026): Agreed to put dimensions in `/assets` API metadata, not response headers
- Jin's cloud PR #2830 (X-Original-Width/Height headers) was closed in favor of this approach
- Jaewon suggested a typed `media_metadata` schema for future extensibility

cc @AustinMroz

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-10590-fix-display-original-image-dimensions-on-cloud-asset-cards-blocked-on-backend-metad-3306d73d365081eca90fcbed0fc51ae8) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Research direction

This is blocked until the `/assets` API returns original dimensions. Once backend metadata is available, inspect `assetSchema.ts` and `MediaAssetCard.vue`, and review `metadata_extract.py` plus PR #12863 for the API alignment. Done means the frontend reads API-provided dimensions and displays them for cloud cards without the `isCloud` gate.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.