when an image is sent as a Viewtype::File, it is sent and received as Viewtype::Image, for historical reasons 1.
this has the disadvantage that the user is not aware of the impact - as increased size, transmitted filename. showing as file also make more clear that the file is really an original file, so may include other data.
for these reasons, other messengers, as telegram, show images sent as files as files.
for outgoing files, the conversion is removed at #8166
for incoming files, we need some flag on the wire. to stay compatible with existing versions, so that not suddenly all images are rendered as files.
the Content-Disposition: header comes into mind for that flag
current headers for (A) images sent as image:
Content-Type: image/jpeg
Content-Disposition: attachment; filename="image_2026-04-24_21-11-19.jpg"
Content-Transfer-Encoding: base64
for (B) image sent as file:
Content-Type: image/jpeg
Content-Disposition: attachment; filename="IMG_1681.jpeg"
Content-Transfer-Encoding: base64
idea is to sent (A) as Content-Disposition: inline (inline does not need a filename).
on the receiving side, images will be rendered as images if set to inline or the filename starts with image_ - the latter can be removed some versions later and is needed to not suddenly render all images as files
when an image is sent as a
Viewtype::File, it is sent and received asViewtype::Image, for historical reasons 1.this has the disadvantage that the user is not aware of the impact - as increased size, transmitted filename. showing as file also make more clear that the file is really an original file, so may include other data.
for these reasons, other messengers, as telegram, show images sent as files as files.
for outgoing files, the conversion is removed at #8166
for incoming files, we need some flag on the wire. to stay compatible with existing versions, so that not suddenly all images are rendered as files.
the
Content-Disposition:header comes into mind for that flagcurrent headers for (A) images sent as image:
for (B) image sent as file:
idea is to sent (A) as
Content-Disposition: inline(inlinedoes not need a filename).on the receiving side, images will be rendered as images if set to
inlineor the filename starts withimage_- the latter can be removed some versions later and is needed to not suddenly render all images as filesFootnotes
history: the auto-conversion comes from a time where we had few options in UI to distinguish. meanwhile, on all platforms the user can select between ↩