1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2025-12-18 08:51:15 +01:00
aerc/lib
Robin Jarry 8fee1477b7 viewer: add html-inline-images option
Add a new html-inline-images option in the [viewer] section that enables
inlining of images referenced by <img> tags with cid: URLs in HTML emails.

When enabled, aerc will parse HTML content to find <img src="cid:...">
references, fetch the corresponding image parts using their Content-ID
and use base64 encoding to embed images directly in HTML using data:
URLs.

This allows HTML emails with embedded images to be properly viewed in
w3m and other browsers that support data: URLs. The implementation uses
asynchronous callbacks to fetch all images in parallel without blocking.

The feature works with all aerc commands that fetch message parts (:save,
:open, :pipe, and viewing). Updated the filters/html script to enable
w3m image support with sixel graphics when img2sixel is available.

Add documentation for the new html-inline-images viewer option in both
the default aerc.conf and the aerc-config(5) man page.

Implements: https://todo.sr.ht/~rjarry/aerc/252
Changelog-added: New `[viewer].html-inline-images` option to replace
 `<img src="cid:...">` tags in `text/html` parts with their related
 `image/*` part data encoded in base64. For this to work with sixel
 compatible terminals, you need to update your filters with `text/html =
 ! html -sixel` and install `img2sixel`.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Tested-by: Inwit <inwit@sindominio.net>
Tested-by: Matthew Phillips <matthew@matthewphillips.info>
2025-12-04 13:52:37 +01:00
..
auth lint: homogenize operations and minor fixes (gocritic) 2022-08-04 21:58:01 +02:00
autoconfig chore: switch to using stdlib helper functions 2025-08-04 12:47:05 +02:00
calendar calendar: make invitation matching case-insensitive 2024-02-11 21:24:18 +01:00
crypto config: allow specifying the temporary directory 2025-10-30 21:17:44 +01:00
format ui: properly trim spaces from addresses 2025-05-21 18:30:55 +02:00
hooks reload: fix crash when reloading via IPC 2025-09-23 14:02:37 +02:00
ipc treewide: fix English spelling 2025-01-21 13:39:01 +01:00
iterator treewide: replace interface{} with any 2025-04-07 10:51:05 +02:00
jwz lib: vendor-in the jwz library 2025-08-28 09:28:16 +02:00
log treewide: replace interface{} with any 2025-04-07 10:51:05 +02:00
marker chore: switch to using stdlib helper functions 2025-08-04 12:47:05 +02:00
notmuch codespell: fix lib/notmuch/directory.go: firs => first 2025-02-01 10:06:41 +01:00
pama chore: switch to using stdlib helper functions 2025-08-04 12:47:05 +02:00
parse treewide: replace interface{} with any 2025-04-07 10:51:05 +02:00
pinentry reload: fix crash when reloading via IPC 2025-09-23 14:02:37 +02:00
rfc822 body-structure: store parts content-id headers 2025-12-04 13:52:37 +01:00
send smtp: add option to request DSN for successful deliveries 2025-03-09 00:40:38 +01:00
sort treewide: replace uint32 uids with opaque strings 2024-08-28 12:06:01 +02:00
state reload: fix crash when reloading via IPC 2025-09-23 14:02:37 +02:00
templates ui: properly trim spaces from addresses 2025-05-21 18:30:55 +02:00
ui grid: fix crash upon mouse event on not yet drawn grid 2025-09-26 16:54:32 +02:00
watchers watchers: fix checking error on darwin 2025-03-30 21:33:20 +02:00
xdg history: read the history file from XDG_STATE_HOME 2024-10-24 22:13:51 +02:00
attachment.go attach: fix content-transfer-encoding for rfc822 attachments 2024-10-24 22:13:51 +02:00
dirstore.go dirstore: list the folders in arrival order 2023-05-28 18:21:26 +02:00
dirstore_test.go dirstore: list the folders in arrival order 2023-05-28 18:21:26 +02:00
emlview.go rfc822: parse multipart messages on a best efforts basis 2024-11-21 22:27:19 +01:00
history.go Add command history and cycling 2019-07-26 14:29:34 -04:00
inlineimages.go viewer: add html-inline-images option 2025-12-04 13:52:37 +01:00
keepalive_dummy.go format: reformat code with go 1.17 2021-12-11 23:24:08 +01:00
keepalive_linux.go format: reformat code with go 1.17 2021-12-11 23:24:08 +01:00
messageview.go viewer: add html-inline-images option 2025-12-04 13:52:37 +01:00
msgstore.go imap: consistently honour message ordering preferences during updates 2025-11-05 10:42:13 +01:00
notmuch_version.go main: improve version string 2024-02-01 00:59:01 +01:00
notmuch_version_dummy.go main: improve version string 2024-02-01 00:59:01 +01:00
oauthbearer.go lint: work nicely with wrapped errors (errorlint) 2022-08-04 21:58:04 +02:00
open.go reload: fix crash when reloading via IPC 2025-09-23 14:02:37 +02:00
structure_helpers.go lib: introduce FindMIMEPart, adapt Find{Plain,Calendar}text 2023-12-30 15:42:09 +01:00
structure_helpers_test.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
threadbuilder.go lib: vendor-in the jwz library 2025-08-28 09:28:16 +02:00
xoauth2.go xdg: get rid of deprecated dependencies 2023-08-27 18:44:12 +02:00