Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


What's the best practice to store large resolution images?

I'm thinking of building a photography subscription website. There will be some free photos to download but you could buy a subscription to see all the photos and be able to download them.

If there's going to be a lot of photos, should I store those in my hosting and upload them to Wordpress?

Also, I'm thinking of using WooCommerce and WooCommerce subscriptions. Is that a good aproach?

I've heard about using a CDN to store videos instead of hosting those yourself. Is there something similar for photography?

4 Answers

Nathan Williams
Nathan Williams
Python Web Development Techdegree Student 6,851 Points

S3's pretty popular for file hosting; and you don't have to worry about having huge disks on your app server as the site grows. You can also generate access tokens to restrict access to content users haven't purchased, etc.

Kevin Korte
Kevin Korte
28,148 Points

I second S3, that was my thoughts too.

I built http://picography.co and it uses S3 for the downloadable files and then MaxCDN caches them which serves them with a nice URL for people.

For the preview images and all general site assets (css, js, etc.) we have a second MaxCDN subdomain to help speed up the site up globally.

Hope this helps!

You didn't mention anything about the technology. Where do you want to store, what is the size of the image files, etc. But, if you have some large number of typically large image files (less than 10MB) into an RDBMS, BLOB is definitely the best option. It is meant for exactly these use case -- space efficient storage of binary data and get some great images from https://rfclipart.com/ to practice with it.