4 ms·
This is good advice. Just pick a resize dimension and try to resize everything that comes in. If it fails it's not an image. You can hang an event off S3 and
by smackeyacky 2y ago
This is good advice. Just pick a resize dimension and try to resize everything that comes in. If it fails it's not an image.
You can hang an event off S3 and have a lambda that does the work / warns you of a bad upload.
- kijin 2y agoResizing also helps reduce costs. The latest phones can generate ridiculously large images with 200+ megapixels. You really don't want to dump that kind of behemoth in your S3 bucket and serve it as somebody's profile pic. Videos will add even more to your AWS bill if you're not careful. Re-encode that 4K cat video as soon as it comes in, or wire up a CDN to do it for you.