Skip to content

Feature Request: Optional in-place image preview to reuse cached image and avoid new tab overhead #77

@zmhdjphgp4-wq

Description

@zmhdjphgp4-wq

Hi! First of all, thank you for the great extension—BetterViewer is by far the most comfortable way to inspect and edit images inside Chromium.

Problem
Every time I choose “Open Image in BetterViewer” the extension opens a new tab and reloads the image from the network. This has two drawbacks:
The image is downloaded again even though the browser already has it in memory/disk cache.
Switching tabs breaks the original browsing flow and creates extra clutter.

Suggested solution
Add an optional “in-place” mode that:
Re-uses the already-loaded element from the current page instead of opening a new tab.
Overlays the BetterViewer UI (zoom, rotate, filters, etc.) on top of the page, similar to how most “lightbox” extensions work.
Falls back to the current new-tab behaviour when the image is protected by CORS or when the user explicitly wants a separate tab.

Implementation ideas
Add a new context-menu item: “Preview with BetterViewer (in place)”.
Introduce a toggle in the extension popup: “Always use in-place preview”.
When in-place is triggered, inject a small shadow-DOM host next to the original and render the viewer inside it; destroy the host when the user presses Esc or clicks outside.

Benefits
Instant preview—zero re-download, zero flicker.
Keeps the user on the original page.
Still allows “Open in new tab” for users who prefer the current workflow.
I’d be happy to test any experimental branch or provide further feedback. Thanks for considering this!

(I am not familiar with English. This issue was written with the help of Kimi AI. If there are any inaccuracies in the wording, I hope you can forgive me)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions