Feature: Preview for bytea image fields in query results

Open
#9,852 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
postgresql, python
Domain
database

Research direction

The issue does not identify any files, tests, or entry points in pgAdmin. Research would need to locate the query result grid and its bytea rendering path first; done would include image detection and preview behavior, with the optional open and download actions defined and tested.

Written by the indexing model from the issue text.

Description

Feature

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.

Dominant language
Python
Stars
3.9k
Forks
922
Avg merge
2d 3h
Merged PRs (30d)
33

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pgadmin-org/pgadmin4

All issues in pgadmin-org/pgadmin4

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.