Starting to realize how many people have >25MB profile pictures in Nostr. No wonder why things have been crashing...

Gotta find an image proxy and scale them down to under 500kb to make things better.

Reply to this note

Please Login to reply.

Discussion

8.4 kb

how to balance scale images down,but no much lost resolution

Not worth it for the very small thumbnails. Save the full size display and uncompressed picture for full page requested views, which would be like the Twitter profile full size profile view feature

>25MB 😂

🤣

I’ve used this. It was good, but crashed more often than expected when running in docker.

OOM’d?

My Amethyst app size has gone up to 1.5 Gb after latest update, any idea why the app is getting so big?

Or maybe any plans in future updates that can scale down the app size?

That's just the cache limits.

Okay got it.

Thanks for working on this awesome app. More power to you 😁

Making these cache sizes configurable would be awesome!p

😆 5mb is a fair limit

Check out the accounts #[2] is following. I made it for testing image down sampling in Damus.

Don't get rid of view counter lol

That explains a lot. Literally <5k probably down to 2000 bytes, even configurable, would be fine for these thumbnails, scrolling is currently very janky. Unless the user individually requested a full size profile preview like Twitter. C# has brilliantly fast image resizing but that might only be due to Windows GDI. I made a 'facebook user profile image library' for a very similar problem years back. If there's a utility lib for Java/Android, these reduced images could go into a cache pool, and all be done in the client without a proxy online. I'm going library hunting.

What do you think? Worth a try? I don't see the robust interpolation options c# has but maybe it's fast and great OOB

https://github.com/hkk595/Resizer

This example resized image is under 7k and is larger pixel wise than the app profile thumbnails.

. This is just some random image a guy did off this thread and if the source image were better, so would be the result.

If it got really crazy, a lazy loader could go get and resize at higher quality when the scrolling stops, and you can always dispose the originals https://stackoverflow.com/questions/46149206/how-to-resize-image-without-losing-quality

Here's a list of Java and two Android image sizers

https://github.com/topics/image-resizer?l=java

This one looks very nice but might be difficult to get into Android

https://github.com/aidan-n/seam-carving

Hey Vitor. Search for Nostr Media Cache.

It's in media.nostr.band

To be honest all of nostr needs better image management. Data usage on the protocol is not so efficient right now. Mobile companies loving it tho

Yes, I have to empty my cache regularly. Mayby an in app button to empty cache could be an idea.

Is banner size also an issue when to large?

*too

mine is 29kb. Should be acceptable

Sometimes yes, but the relay is only visible on the profile page. The app has a chance to delete the cache.

Profile pictures keep showing up in multiple places at random. Caching is hard.

#[2] reported that many users have profile pics larger than 25MB. If clients pull those images then that would add up quick. See note #[3]

Maybe that’s not it, but most likely contributes if profile pics aren’t cached. Or is it simply lots of relay traffic between client and the relays. #[4] #[5] curious to know your thoughts.

Fun things to work out as this amazing system gets built!