Menu

Your users upload 12MP phone photos. Your app shouldn't serve them raw.
📰

Your users upload 12MP phone photos. Your app shouldn't serve them raw.

DEV Community: dotnet·Daniel Davis·6 days ago
#1lMhBzbz
#devtodotnet#devto#dev#picready#webp
Reading 0:00
15s threshold

If you have ever wired up an ASP.NET Core photo upload and watched a 12-megapixel phone JPEG land in blob storage at full size, sideways, with GPS still in the EXIF, you already know the feeling. The endpoint works. The CDN bill and the broken avatars arrive later.

I also know the other path by heart: pull in SkiaSharp, remember which native asset package Linux needs, apply EXIF orientation yourself, pick a fit mode that does not letterbox by accident, binary-search JPEG quality until the file is under 100 KB, and hope nobody posts a decompression bomb. It works. It is also easy to get slightly wrong on the second feature.

So I built PicReady : a small .NET 8/9 library that wraps SkiaSharp for the everyday web-app jobs — resize, crop, avatar, WebP, strip EXIF, hit a max byte size — behind a short fluent API. PicReady.Lite is the free MIT subset for a plain resize.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.