~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
9 months ago
Updated
8 months ago
Labels
feature ui

~rjarry closed duplicate ticket #260 8 months ago

~rjarry 8 months 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 8 months ago*

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

~neff 8 months 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.