pgadmin-org / pgadmin-org/pgadmin4
Feature: Preview for bytea image fields in query results
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 891
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 8
Description
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
byteadata 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- postgresql, python
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100