Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Support for webp Stickers in iOS Element App and Automate Thumbnail Conversion to GIF #51

Open
cksit opened this issue Apr 18, 2024 · 2 comments

Comments

@cksit
Copy link
Contributor

cksit commented Apr 18, 2024

Unfortunately, the current iOS Element app does not support webp stickers.

After testing, I have successfully enabled animated stickers in the iOS Element app. Below is an example sticker format:

        {
            "body": "🔫",
            "url": "mxc://<my-home-server>/bmNWFYcyvThrPsgAHsMaFJBL",
            "info": {
                "w": 512,
                "h": 512,
                "size": 82887,
                "mimetype": "image/gif",
                "thumbnail_url": "mxc://<my-home-server>/bmNWFYcyvThrPsgAHsMaFJBL",
                "thumbnail_info": {
                    "w": 128,
                    "h": 128,
                    "size": 2580,
                    "mimetype": "image/gif"
                }
            },
            "msgtype": "m.sticker",
            "id": "mxc://<my-home-server>/bmNWFYcyvThrPsgAHsMaFJBL",
            "net.maunium.telegram.sticker": null
        },

During testing, I found that both the sticker and its thumbnail must have the mimetype set to image/gif. However, since the uploaded thumbnail is in webp format, I've utilized the sticker URL as the thumbnail URL, which has proven to work flawlessly.

I'm now considering if there's a more automated approach to this issue, such as converting the thumbnail into a GIF format and uploading it to the Synapse Matrix server. Any insights on this matter would be greatly appreciated.

@LuckyTurtleDev
Copy link
Owner

yes see: https://github.com/LuckyTurtleDev/mstickereditor?tab=readme-ov-file#configuration

make sure to use version v0.3.6 or newer because of issue #50.

@cksit
Copy link
Contributor Author

cksit commented Apr 19, 2024

Sorry, forgot to mentioned that I created that PR to fix the Gif animation_format issue. However, as I mentioned, it only convert the tgs file to gif. The thumbnail file from Telegram are in webp format which are not converted. So is there any workaround to convert those thumbnail as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants