Thread

#Amethyst v0.83.1: NIP-44v2 DMs are up! New Features - Moves DMs to the audited NIP-44v2 - Adds support for NIP-31 alt tags - Adds a k-tag to reactions - Adds i18n for error messages when uploading images Performance Improvements: - Improves the performance of Robohash - Add less memory-intensive timeAgo calculations and translations - Uses primitives instead of the wrapped object in several places - Moves to a less memory-intensive way to write and send filters to the server. - Refines recompositions of routes and bottom icons - Avoids the creation of new sets when looping through cached maps of User and Notes - Avoids recreating the EOSE array when changing filters - Reuses SessionToken for all Playback connections - Improving the memory use of concurrent hashmaps and immutable collections - Reduces the use of remember for fixed UI modifiers Bugfixes: - Detects URL mime-types by pinging the server instead of relying on the url's extension - Fixes bug with cropped joinToString assemblies of relay filters - Avoids Concurrent Modification Exception on the EOSE markups - Forces nip95 to be under 80Kb to make sure relays can receive it - Fixes bug that error messages wouldn't show an error when uploading images to the reels page - Fixes post video dimensions when the user has selected not to load videos automatically - Updates dependencies Updated translations: - Chinese by @ra5pvt1n - Finnish by @petri - Hungarian by @npub1ww8k...nvtp - Dutch by @npub1w4la...txcd - Tamil by @_ Download: - [Play Edition](๐Ÿ’พ.apk ) - [FOSS Edition - No translations](๐Ÿ’พ.apk )

Replies (16)

I check for opengraph's info for preview cards in every url. Thus, I end up hitting the server even for images and videos. When that happens, you also receive the content-type of the file in the HTTP header. I use that to determine how to render the media. I still check extensions first, but that has proven to be problematic (some image servers serve different formats, other urls have query params that affect the discovery and many don't actually offer extensions at all).
The only way to trully solve this is to either have a server that can provide image sizes or download everything before showing on the feed. There are hacks like the imeta tag or nip54, but those depend entirely in the writer client including them, which is not ideal for the receiving client.