PHPackages                             texxasrulez/inline\_previewer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. texxasrulez/inline\_previewer

ActiveRoundcube-plugin[Utility &amp; Helpers](/categories/utility)

texxasrulez/inline\_previewer
=============================

Secure inline attachment previews for Roundcube message view

0.0.1(2mo ago)01GPL-3.0PHPPHP &gt;=8.0

Since Mar 6Pushed 2mo agoCompare

[ Source](https://github.com/texxasrulez/inline_previewer)[ Packagist](https://packagist.org/packages/texxasrulez/inline_previewer)[ Docs](https://github.com/texxasrulez/inline_previewer)[ RSS](/packages/texxasrulez-inline-previewer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

inline\_previewer
=================

[](#inline_previewer)

[![Packagist Downloads](https://camo.githubusercontent.com/39f5e6d43e5540c3f8ec5de7dd2371ea3106717d71a69692c65aba315b64c20a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74657878617372756c657a2f696e6c696e655f7072657669657765723f7374796c653d706c6173746963266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473266c6162656c436f6c6f723d626c756526636f6c6f723d676f6c64)](https://packagist.org/packages/texxasrulez/inline_previewer)[![Packagist Version](https://camo.githubusercontent.com/3235906484ae9f93562e710bb703b4a930d74496d402e6a91cc6897728f9e9d9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74657878617372756c657a2f696e6c696e655f7072657669657765723f7374796c653d706c6173746963266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c3d56657273696f6e266c6162656c436f6c6f723d626c756526636f6c6f723d6c696d65677265656e)](https://packagist.org/packages/texxasrulez/inline_previewer)[![Github License](https://camo.githubusercontent.com/34d948c1ba3a41a117709edef08ae401ae9fdc6be79020ab3b0b9755038e2c82/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f74657878617372756c657a2f696e6c696e655f7072657669657765723f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d4c6963656e7365266c6162656c436f6c6f723d626c756526636f6c6f723d636f72616c)](https://github.com/texxasrulez/inline_previewer/LICENSE)[![GitHub Stars](https://camo.githubusercontent.com/861f92dd2b69511a824b3e97d8858e90507619db4e6f6554a8a4e4426e48484c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f74657878617372756c657a2f696e6c696e655f7072657669657765723f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d5374617273266c6162656c436f6c6f723d626c756526636f6c6f723d64656570736b79626c7565)](https://github.com/texxasrulez/inline_previewer/stargazers)[![GitHub Issues](https://camo.githubusercontent.com/581c3983600a2dc2d2417d2ae025ad260a1110b69b294f439c3d34005f381185/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f74657878617372756c657a2f696e6c696e655f7072657669657765723f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d497373756573266c6162656c436f6c6f723d626c756526636f6c6f723d61717561)](https://github.com/texxasrulez/inline_previewer/issues)[![GitHub Contributors](https://camo.githubusercontent.com/f039db46dec58fab6b05ddcf8e8c10b916b085d4ff29bd98ec70748c22508d96/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f74657878617372756c657a2f696e6c696e655f7072657669657765723f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d436f6e7472696275746f7273266c6162656c436f6c6f723d626c756526636f6c6f723d6f7263686964)](https://github.com/texxasrulez/inline_previewer/graphs/contributors)[![GitHub Forks](https://camo.githubusercontent.com/c004eef96046e4e1885a8ef90951d79c334b06d41dd47816c2c9b32de972adb3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f74657878617372756c657a2f696e6c696e655f7072657669657765723f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d466f726b73266c6162656c436f6c6f723d626c756526636f6c6f723d6461726b6f72616e6765)](https://github.com/texxasrulez/inline_previewer/forks)[![Donate Paypal](https://camo.githubusercontent.com/02124075ee7ea4c192ef867cb30577b0b43ba74ea42b8dbe20b56ef518d94cdb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50617970616c2d4d6f6e65795f506c65617365212d626c75652e7376673f7374796c653d706c6173746963266c6162656c436f6c6f723d626c756526636f6c6f723d666f72657374677265656e266c6f676f3d70617970616c)](https://www.paypal.me/texxasrulez)

`inline_previewer` adds secure inline attachment previews in Roundcube message view.

Features
--------

[](#features)

- Inline attachment cards rendered below message view content.
- Supported previews (strict whitelist): images, PDF, and optional audio/video.
- Collapsed-by-default lazy previews with optional `Preview all` / `Collapse all` controls.
- Consistent fallback cards for unsupported files (filename, size, MIME, Download button).
- vCard attachments can be imported into address book directly from the card action.
- Office/vCard card handlers support `Open in new tab` via safe openable-type allowlist.
- Keeps existing Roundcube attachment download behavior intact.

Installation
------------

[](#installation)

1. Copy `plugins/inline_previewer` into your Roundcube `plugins/` directory.
2. Copy `plugins/inline_previewer/config.inc.php.dist` to `plugins/inline_previewer/config.inc.php`.
3. Add `inline_previewer` to `$config['plugins']` in Roundcube main config.
4. Clear Roundcube cache if needed.

Configuration
-------------

[](#configuration)

Main options in `config.inc.php`:

- `$config['inline_previewer_enabled']`
- `$config['inline_previewer_disable_vcard_import_when_vcard_attach']`
- `$config['inline_previewer_debug_log']`
- `$config['inline_previewer_collapsed_by_default']`
- `$config['inline_previewer_show_bulk_controls']`
- `$config['inline_previewer_enable_media']`
- `$config['inline_previewer_enable_text_preview']`
- `$config['inline_previewer_enable_office_preview']`
- `$config['inline_previewer_allow_svg']`
- `$config['inline_previewer_max_preview_size']`
- `$config['inline_previewer_allowed_mime_types']`
- `$config['inline_previewer_allowed_extensions']`
- `$config['inline_previewer_openable_mime_types']`
- `$config['inline_previewer_openable_extensions']`

Security Notes
--------------

[](#security-notes)

- HTML/XHTML attachments are never previewable by default whitelist.
- MIME type and extension are both checked before enabling preview.
- Preview size is capped (`inline_previewer_max_preview_size`).
- Preview responses are served through Roundcube's authenticated attachment action (`_action=get`) only.
- Preview requests apply stricter headers via `message_part_get`:
    - `Content-Security-Policy`
    - `X-Content-Type-Options: nosniff`
    - `Referrer-Policy: no-referrer`
- No remote URL fetching is used; previews only target current message attachments.
- Optional compatibility guard disables plugin vCard import when `vcard_attach` is active.

Hook Usage
----------

[](#hook-usage)

- `message_load`: reads message attachments and computes per-file preview eligibility.
- `render_page`: injects plugin CSS/JS and attachment metadata into the message page.
- `message_part_get`: enforces safe inline headers and keeps non-whitelisted requests as download.

Manual Test Plan
----------------

[](#manual-test-plan)

1. Open a message with JPG/PNG/PDF attachments and verify each card shows `Preview` + `Download` + `Open in new tab`.
2. Expand previews and confirm lazy-load behavior (content loads only after opening).
3. Attach a file larger than configured max size and verify `Too large to preview` appears.
4. Attach unsupported types (`.html`, `.js`, `.zip`) and verify no inline preview is offered.
5. Enable media config and verify MP3/MP4 preview works; disable and verify it is blocked.
6. Confirm direct Download links still work for all attachment types.
7. Inspect preview response headers in browser devtools and verify CSP + nosniff are present.
8. Test with `vcard_attach` enabled and verify inline\_previewer `Import` button is hidden/disabled by config default.
9. Enable `inline_previewer_debug_log` and confirm failures write `[inline_previewer]` entries in Roundcube error log.

Changelog
---------

[](#changelog)

### 0.0.1

[](#001)

- Added compatibility guard for `vcard_attach` overlap on vCard import.
- Added optional debug logging for preview/import failure paths.
- Added additional preview support for text and office file types.

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance94

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

63d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95c3af6e41a9786e8be2edb48176e43a7d1ddef429793a312168450ff4269deb?d=identicon)[texxasrulez](/maintainers/texxasrulez)

---

Top Contributors

[![texxasrulez](https://avatars.githubusercontent.com/u/10519182?v=4)](https://github.com/texxasrulez "texxasrulez (2 commits)")

### Embed Badge

![Health badge](/badges/texxasrulez-inline-previewer/health.svg)

```
[![Health](https://phpackages.com/badges/texxasrulez-inline-previewer/health.svg)](https://phpackages.com/packages/texxasrulez-inline-previewer)
```

###  Alternatives

[roundcube/carddav

CardDAV adapter for connecting to CardDAV-enabled addressbooks

28155.3k](/packages/roundcube-carddav)[johndoh/globaladdressbook

Adds global address books to Roundcube

706.0k](/packages/johndoh-globaladdressbook)[johndoh/sauserprefs

Control SpamAssassin settings from within Roundcube

583.6k](/packages/johndoh-sauserprefs)[jfcherng-roundcube/show-folder-size

A Roundcube plugin which shows folder size.

2515.2k](/packages/jfcherng-roundcube-show-folder-size)[kolab/calendar

Calendar plugin

3010.5k](/packages/kolab-calendar)[johndoh/swipe

Adds swipe actions to the message list of Roundcube

115.3k](/packages/johndoh-swipe)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
