Hey everyone! I recently built a project using Firebase, which is kind of like a local version of Yelp for my school, where students can share places to eat in our community. The site has an interactive map and allows users to upload pictures of their experiences. While I had a great response, I was surprised to find that I exceeded my outgoing bandwidth limit in just one day, leading to a small bill of 8 cents! It made me realize that I need to optimize the site since images taken from phones can be quite large.
So far, I've implemented lazy loading, caching, and file minification, but I believe the images (especially those on the map and the uploaded pictures) are the main issue. I found suggestions for compressing images, using different formats like WebP, and possibly using a CDN, but I'm hoping to hear from seasoned developers on the best tools or practices they use for this kind of situation. How do you handle image uploads and storage while keeping costs low? Thanks in advance for your insight!
1 Answer
You might want to look into specialized blob storage services like AWS S3 or GCP Cloud Storage for your images. They're usually pretty cost-effective. Also, you can help reduce repeated accesses by setting caching headers on your images. And remember, it's okay to revisit your project; you'll learn tons from reworking things!
Thanks for that advice! I didn’t realize how much could be gained from updating things as I learn more. I'll definitely look into blob storage!