GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
571 stars 60 forks source link

[Bug]: webp images do not load #708

Closed selfisekai closed 10 months ago

selfisekai commented 10 months ago

Describe the bug

gray (or color gradient with a letter or two, for actor avatars) placeholder appears instead of some images. also the blurhash does not get rendered either.

Steps To Reproduce

  1. open a post with webp images (seems especially common on misskey derivatives for some reason), e.g. https://meow.woem.cat/notes/9l6r5rkckmx5le4s

Logs and/or Screenshots

screenshot of the post linked above. instead of an image in it, it's gray. also the avatar is a gray gradient with letters "M:" on it

Instance Backend

Mastodon

Operating System

Alpine Linux edge

Package

OS repositories

Troubleshooting information

os: Alpine Linux (null) prefix: /usr flatpak: false version: 0.5.0 (production) gtk: 4.12.4 (4.12.2) libadwaita: 1.4.2 (1.4.0) libsoup: 3.4.4 (3.4.2) libgtksourceview: 5.10.0 (5.10.0)

Additional Context

not sure if it's Alpine-specific or not.

post's JSON as visible from social.hackerspace.pl:

{
        "id": "111285575747059527",
        "created_at": "2023-10-23T17:45:21.612Z",
        "in_reply_to_id": null,
        "in_reply_to_account_id": null,
        "sensitive": false,
        "spoiler_text": "",
        "visibility": "public",
        "language": null,
        "uri": "https://meow.woem.cat/notes/9l6r5rkckmx5le4s",
        "url": "https://meow.woem.cat/notes/9l6r5rkckmx5le4s",
        "replies_count": 0,
        "reblogs_count": 1,
        "favourites_count": 0,
        "edited_at": null,
        "favourited": false,
        "reblogged": false,
        "muted": false,
        "bookmarked": false,
        "content": "<p><span>a monument to all the lesbians of Baltimore </span>​:lesbian_heart:​<span><br><br></span><a href=\"https://mastodon.org.uk/@tbruck/111160530500165902\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span>migrated</span></a></p>",
        "filtered": [],
        "reblog": null,
        "account": {
            "id": "111241208181625137",
            "username": "maeow",
            "acct": "maeow@meow.woem.cat",
            "display_name": "maeow :verified_transgender: :verified_pleading:",
            "locked": true,
            "bot": false,
            "discoverable": true,
            "group": false,
            "created_at": "2023-10-15T00:00:00.000Z",
            "note": "<p><span>
Hi, I'm Mae! (yes, another one on this instance)<br>Totally queer, sapphic, and poly 20-something trans catgirl </span>🏳️‍🌈🏳️‍⚧️<span>. <br>Contains too much gay and is really kinky. Will cuddle you if you’re cool with that! Being lewd &amp; flirty towards me is cool if you're visibly queer in your profile - ask if you’re unsure :3<br>Trans rights are human rights. Get lost, TERFs. <br>Follow requests welcome, just have something about you in your profile :p<br>Minors please don’t interact with lewd and otherwise mature toots. Posts and boosts lewd &amp; NSFW content, hopefully always CWd.<br></span>📷🎥<span> w/o faces: </span>​:cc_cc_zero:​<span>, else face-blur req’d for CC0.<br></span>🚂​:neocat_train_wagon:​​:neocat_train_wagon:​​:neocat_train_wagon:​​:neocat_train_wagon:​<span> </span>🥺❤️</p>",
            "url": "https://meow.woem.cat/@maeow",
            "avatar": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/accounts/avatars/111/241/208/181/625/137/original/5ab0a207b3c74be1.webp",
            "avatar_static": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/accounts/avatars/111/241/208/181/625/137/original/5ab0a207b3c74be1.webp",
            "header": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/accounts/headers/111/241/208/181/625/137/original/1131dfe1f18be672.webp",
            "header_static": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/accounts/headers/111/241/208/181/625/137/original/1131dfe1f18be672.webp",
            "followers_count": 2,
            "following_count": 1,
            "statuses_count": 3322,
            "last_status_at": "2023-12-16",
            "emojis": [
                {
                    "shortcode": "cc_cc_zero",
                    "url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/custom_emojis/images/000/063/425/original/2cc9c21091d9cdcc.webp",
                    "static_url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/custom_emojis/images/000/063/425/static/2cc9c21091d9cdcc.png",
                    "visible_in_picker": true
                },
                {
                    "shortcode": "neocat_train_wagon",
                    "url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/custom_emojis/images/000/067/958/original/d04399d97edb813e.png",
                    "static_url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/custom_emojis/images/000/067/958/static/d04399d97edb813e.png",
                    "visible_in_picker": true
                },
                {
                    "shortcode": "verified_transgender",
                    "url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/custom_emojis/images/000/058/797/original/0850a2b107f60e31.png",
                    "static_url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/custom_emojis/images/000/058/797/static/0850a2b107f60e31.png",
                    "visible_in_picker": true
                },
                {
                    "shortcode": "verified_pleading",
                    "url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/custom_emojis/images/000/058/805/original/e77f8e553fba72cb.png",
                    "static_url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/custom_emojis/images/000/058/805/static/e77f8e553fba72cb.png",
                    "visible_in_picker": true
                }
            ],
            "fields": [
                {
                    "name": "Pronouns",
                    "value": "en: she/they, de: sie/ihr",
                    "verified_at": null
                },
                {
                    "name": "Website",
                    "value": "tba",
                    "verified_at": null
                },
                {
                    "name": "Languages",
                    "value": "en-GB, de-AT",
                    "verified_at": null
                }
            ]
        },
        "media_attachments": [
            {
                "id": "111285575510822039",
                "type": "image",
                "url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/media_attachments/files/111/285/575/510/822/039/original/ba141274c515f2b8.webp",
                "preview_url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/media_attachments/files/111/285/575/510/822/039/small/ba141274c515f2b8.webp",
                "remote_url": "https://meow.woem.cat/files/webpublic-35e392fd-67c7-4dbc-97ce-a648dd155802",
                "preview_remote_url": null,
                "text_url": null,
                "meta": {
                    "original": {
                        "width": 1280,
                        "height": 964,
                        "size": "1280x964",
                        "aspect": 1.3278008298755186
                    },
                    "small": {
                        "width": 553,
                        "height": 416,
                        "size": "553x416",
                        "aspect": 1.3293269230769231
                    }
                },
                "description": "A U-Haul truck on a rather precarious looking frame high above the ground and the buildings surrounding it",
                "blurhash": "UrL4mAxtoyj[_Na{jtj[9aWBWBfQaeofbHay"
            }
        ],
        "mentions": [],
        "tags": [],
        "emojis": [
            {
                "shortcode": "lesbian_heart",
                "url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/custom_emojis/images/000/060/102/original/09cbd7d42cc4bb74.png",
                "static_url": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/custom_emojis/images/000/060/102/static/09cbd7d42cc4bb74.png",
                "visible_in_picker": true
            }
        ],
        "card": {
            "url": "https://mastodon.org.uk/@tbruck/111160530500165902",
            "title": "Mae (@tbruck@mastodon.org.uk)",
            "description": "Attached: 1 image\n\na monument to all the lesbians of Baltimore",
            "type": "link",
            "author_name": "",
            "author_url": "",
            "provider_name": "Mastodon.org.uk",
            "provider_url": "",
            "html": "",
            "width": 400,
            "height": 301,
            "image": "https://object.ceph-waw3.hswaw.net/mastodon-prod/cache/preview_cards/images/000/326/712/original/ee7189297e936265.jpeg",
            "embed_url": "",
            "blurhash": "UqK_5jxtoyj[_Na{jtj[D*WBWBfQaeofbHay"
        },
        "poll": null
}
LukaszH77 commented 10 months ago

Works for me in the current dev version.

obraz

GeopJr commented 10 months ago

You need webp-pixbuf-loader!

selfisekai commented 10 months ago

alright, thanks, submitted https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/57408

GeopJr commented 10 months ago

Thanks! It's technically not a hard dependency (though meson does detect it and display a warning about loading webp images during compilation). Not sure if alpine will add it as many people are suspicious about webp and its recent (fixed) CVE and might not want it installed :shrug:. At the same time some fedi software use exclusively webps (i think one if not all the misskey forks)