~rjarry/aerc#258: 
Image format incorrect in some cases

Hi guys,

I happened to notice another tiny issue.

Images work very well in aerc (without a [filter]).

Yet, in some cases the image format is incorrect so that aerc doesn't render the image at all.

One case in my inbox is an inlined image sent with Outlook:

Outlook-n4ak43wl (image/jpg)

Another case is an unsuspicious JPEG, which is shown as

20240614_111111.jpg (image/*) 

The interesting thing is that when I download the images and

file --mime-type IMAGE

the result is correct in both cases:

image/jpeg

(I hope this issue has not been mentioned. )

Thanks for all your work!

Status
REPORTED
Submitter
~neff
Assigned to
No-one
Submitted
a month ago
Updated
26 days ago
Labels
feature ui

~rjarry closed duplicate ticket #260 27 days ago

~rjarry 27 days ago*

Unfortunately, there isn't anything aerc can do to "guess" what is the correct mime type.

The only solution would be to add explicit filter rules with certain (invalid) mime types to force the builtin terminal image view. For example:

[filters]
.filename,~.*\.jpg = __TERM_GRAPHICS__(image/jpeg)
image/jpg =  __TERM_GRAPHICS__(image/jpeg)

~rjarry 27 days ago*

To clarify, aerc does not implement this __TERM_GRAPHICS__ special filter value yet. I am simply throwing ideas.

~neff 26 days ago

Thank you. This would be a good solution, if such a fallback is not to be included into the msgviewer, because it's easily extendable.

Register here or Log in to comment, or comment via email.