Skip to content

[BUG] Mastodon won't load .avif images of posts #125

@3000Neo

Description

@3000Neo

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When viewing a post with .avif pictures the pictures don't load.
When setting RAILS_LOG_LEVEL=debug the following error is visible in the docker log:
D, [2025-10-20T18:53:44.055743 #400] DEBUG -- : [03805363-5b8f-4f5c-b715-acd027bd9679] Error fetching remote file: Error while optimizing 0b46c1d2ba8b23e88126430f6a9dd40820251020-400-p9cfns: VipsForeignLoad: "/tmp/0b46c1d2ba8b23e88126430f6a9dd40820251020-400-p9cfns.avif" is not a known file format

Expected Behavior

The pictures of the post get shown

Steps To Reproduce

  1. Open a post with .avif images (for example: https://icy.arcticfluff.eu/@toomanyfoxes/statuses/01K7XS068T38TVNV29C9Q8G565 (not my post, just a post where I noticed the problem on my server))
  2. Pictures don't load

Environment

- OS: unraid 6.12.10
- How docker service was installed: preinstalled with OS

CPU architecture

x86-64

Docker creation

docker run
  -d
  --name='mastodon'
  --net='bond0'
  --ip='192.168.178.5'
  -e TZ="Europe/Berlin"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="EDIv2"
  -e HOST_CONTAINERNAME="mastodon"
  -e 'TCP_PORT_80'='80'
  -e 'TCP_PORT_443'='443'
  -e 'LOCAL_DOMAIN'=<secret>
  -e 'REDIS_HOST'='192.168.178.19'
  -e 'REDIS_PORT'='6379'
  -e 'DB_HOST'='192.168.178.6'
  -e 'DB_USER'='mastodon'
  -e 'DB_NAME'='mastodon'
  -e 'DB_PASS'=<secret>
  -e 'DB_PORT'='5432'
  -e 'ES_ENABLED'='true'
  -e 'SECRET_KEY_BASE'=<secret>
  -e 'OTP_SECRET'=<secret>
  -e 'VAPID_PRIVATE_KEY'=<secret>
  -e 'VAPID_PUBLIC_KEY'=<secret>
  -e 'SMTP_SERVER'=<secret>
  -e 'SMTP_PORT'='587'
  -e 'SMTP_LOGIN'=<secret>
  -e 'SMTP_PASSWORD'=<secret>
  -e 'SMTP_FROM_ADDRESS'=<secret>
  -e 'S3_ENABLED'='false'
  -e 'WEB_DOMAIN'=<secret>
  -e 'ES_HOST'='192.168.178.216'
  -e 'ES_PORT'='9200'
  -e 'ES_USER'='elastic'
  -e 'ES_PASS'=<secret>
  -e 'S3_BUCKET'=''
  -e 'AWS_ACCESS_KEY_ID'=''
  -e 'AWS_SECRET_ACCESS_KEY'=''
  -e 'S3_ALIAS_HOST'=''
  -e 'TRUSTED_PROXY_IP'='192.168.178.11,127.0.0.1'
  -e 'SINGLE_USER_MODE'='true'
  -e 'ES_PRESET'='single_node_cluster'
  -e 'ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY'=<secret>
  -e 'ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT'=<secret>
  -e 'ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY'=<secret>
  -e 'LOG_LEVEL'='info'
  -e 'RAILS_LOG_LEVEL'='info'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mastodon-logo.png'
  -v '/mnt/disk1/docker-data-array/mastodon/':'/config':'rw,slave' 'lscr.io/linuxserver/mastodon:latest'

Container logs

D, [2025-10-20T18:53:44.055743 #400] DEBUG -- : [03805363-5b8f-4f5c-b715-acd027bd9679] Error fetching remote file: Error while optimizing 0b46c1d2ba8b23e88126430f6a9dd40820251020-400-p9cfns: VipsForeignLoad: "/tmp/0b46c1d2ba8b23e88126430f6a9dd40820251020-400-p9cfns.avif" is not a known file format

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions