Skip to content

Feature: Preview for bytea image fields in query results #9852

@flaviarps

Description

@flaviarps

Describe the solution you'd like

Add native support in pgAdmin to preview bytea fields as images (e.g., JPEG, PNG) directly in the query result grid.

The tool should automatically detect common image formats and provide a visual preview (thumbnail or full image), similar to what is available in DBeaver.

Optionally, include actions such as:

  • "Open as image"
  • "Download file"

Describe alternatives you've considered

Currently, the only alternatives are:

  • Manually converting bytea data to base64 or binary and saving it as a file
  • Using external tools or scripts (e.g., Node.js, Python) to reconstruct the image
  • Using other database clients like DBeaver, which already support this feature

These approaches are time-consuming and reduce productivity when inspecting data.


Additional context

This feature would significantly improve the usability of pgAdmin when working with binary data, especially for debugging and validating stored images.

Example use case:

SELECT image_data FROM files LIMIT 1;

In pgAdmin, the result is displayed as raw binary/hex data, making it difficult to interpret. A built-in preview would eliminate the need for manual extraction.

This is particularly useful in systems that store files or images directly in PostgreSQL using bytea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions