dtonon on Nostr: Profile pictures are rendered by all Nostr apps in large quantities, so it is very ...
Profile pictures are rendered by all Nostr apps in large quantities, so it is very important to optimize them to get good performances and respect users' bandwidth.
With modern phones and camera is not unusual to capture images larger than 2MB, and these images are often immediately uploaded (of course) without any optimization.
These are the statistics for profile image sizes based on a random selection of my following and following of following, with a sample size of 1,000 profiles:
| Size Range | Count |
----------------------------
| < 100KB | 421 |
| < 500KB | 315 |
| < 1MB | 76 |
| < 2MB | 63 |
| < 3MB | 40 |
| < 4MB | 30 |
| < 5MB | 10 |
| < 10MB | 10 |
| > 10MB | 9 |
----------------------------
| Timeouts | 2 |
| Broken Links | 24 |
| Total | 1000 |
55,3% (> 100KB) of the profile pictures can optimized!
I suggest that all developers resize the images client-side before uploading, inscribing them in a 1000x1000px square (or 800x800, which is more than enough even for a full-screen preview) and save them with 70% jpeg quality.
This setting should bring images below 100KB and make users happy.
Published at
2025-09-03 18:50:20 UTCEvent JSON
{
"id": "053d0dbc51b01c6e4f3ac195f08ba9e164648fbd583b7c3bdd54847d63ee6e2e",
"pubkey": "7bdef7be22dd8e59f4600e044aa53a1cf975a9dc7d27df5833bc77db784a5805",
"created_at": 1756925420,
"kind": 1,
"tags": [],
"content": "Profile pictures are rendered by all Nostr apps in large quantities, so it is very important to optimize them to get good performances and respect users' bandwidth.\nWith modern phones and camera is not unusual to capture images larger than 2MB, and these images are often immediately uploaded (of course) without any optimization.\n\nThese are the statistics for profile image sizes based on a random selection of my following and following of following, with a sample size of 1,000 profiles:\n\n| Size Range | Count |\n----------------------------\n| \u003c 100KB | 421 |\n| \u003c 500KB | 315 |\n| \u003c 1MB | 76 |\n| \u003c 2MB | 63 |\n| \u003c 3MB | 40 |\n| \u003c 4MB | 30 |\n| \u003c 5MB | 10 |\n| \u003c 10MB | 10 |\n| \u003e 10MB | 9 |\n----------------------------\n| Timeouts | 2 |\n| Broken Links | 24 |\n| Total | 1000 |\n\n55,3% (\u003e 100KB) of the profile pictures can optimized!\n\nI suggest that all developers resize the images client-side before uploading, inscribing them in a 1000x1000px square (or 800x800, which is more than enough even for a full-screen preview) and save them with 70% jpeg quality.\nThis setting should bring images below 100KB and make users happy.",
"sig": "a0c4f46ea5200b499e06bb656ca17386c3e9b8dd8ea63f60fc92feeeb6db64b3742eccb964e78b15d1c88fae029ecb52a9353e5d63556fe887479769c9433173"
}