Opened 16 months ago

Last modified 16 months ago

#66581 new defect

claws-mail: No images displayed in standard mail (image viewer settings not working)

Reported by: Rezzy-dev (Rezzy) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: Cc:
Port: claws-mail

Description

Claws Mail has options in the Preferences under the "Message View" header for the built-in "Image Viewer". The problem is none of these seem to be currently working in the port -- none of the images are displayed in regular emails (non-HTML).

I'm not sure if this is a dependency issue (if Claws Mail is relying on a library that isn't present to render/display the images), if it's a bug/omission in the port, or if I'm missing something.

The logs don't seem to show anything wrong either -- Claws Mail doesn't seem to realise there is a problem.

To replicate the issue, tick all the Image Viewer settings to be on, and relaunch Claws Mail. If there are image attachments in an email, Claws Mail won't show them in the mail (only links to the files).

Change History (3)

comment:1 Changed 16 months ago by jmroot (Joshua Root)

Summary: No images displayed in standard mail (image viewer settings not working)claws-mail: No images displayed in standard mail (image viewer settings not working)

comment:2 Changed 16 months ago by Rezzy-dev (Rezzy)

Found the cause! The built-in image viewer is working, it's just that Claws Mail assigns the wrong MIME type to image attachments. They're automatically given an undetermined MIME type: application/octetstream. They should be image/jpeg and image/png. When I manually change their MIME type at the time of attachment, the images show as expected in the sent and received mail.

How does Claws Mail determine/assign the MIME types for attachments? Where is its MIME database stored? It seems to be having trouble deciding what MIME type files attached from the Mac HD are.

comment:3 Changed 16 months ago by Rezzy-dev (Rezzy)

Solution found!

Claws Mail relies on /etc/mime.types for file MIME type associations when adding attachments to mail.

The solution is to create the /opt/local/etc/mime.types configuration/text file and populate it with:

image/jpeg    jpg jpeg
image/png    png
image/gif    gif
image/webp    webp

After this, the images for attached image files display as expected in mail (Claws Mail assigns the correct MIME type to the attachments).

Last edited 16 months ago by Rezzy-dev (Rezzy) (previous) (diff)
Note: See TracTickets for help on using tickets.